original_code
stringlengths
78
14.8k
modified_code
stringlengths
77
14.8k
changed_line
stringlengths
1
14.4k
number_of_line
int64
1
58
mutation_type
stringclasses
4 values
import math i,x1,y1,x2,y2=input().split() R=int(i) x=int(x1) y=int(y1) xx=int(x2) yy=int(y2) a=(x-xx)*(x-xx) b=(y-yy)*(y-yy) d=math.sqrt(a+b) flag=0 if a+b >= R*R: print(x,end=" ") print(y,end=" ") print(R) flag=1 elif flag!=1: r=(d+R)/2 t=xx + r*(x-xx)/d u=yy + r*(y-yy)/d print(t,end=" ") print(u,end=" ") print(r)
import math i,x1,y1,x2,y2=input().split() R=int(i) x=int(x1) y=int(y1) xx=int(x2) yy=int(y2) a=(x-xx)*(x-xx) b=(y-yy)*(y-yy) d=math.sqrt(a+b) flag=0 if a+b >= R*R: print(x,end=" ") print(y,end=" ") print(R) flag=1 elif flag!=1: r=(d+R)/2 t=xx + r*(x-xx)/d u=yy>>r*(y-yy)/d print(t,end=" ") print(u,end=" ") print(r)
u=yy>>r*(y-yy)/d
20
operation
n=int(input()) a=int(input()) b=0 f=1 while a>0 and n>0: b+=a%2*f a=a//2 f*=2 n-=1 print(b)
n=int(input()) a=int(input()) b=0 f=1 while a>0 and n>0: b+=a^2*f a=a//2 f*=2 n-=1 print(b)
b+=a^2*f
6
operation
n=int(input()) a=int(input()) b=0 f=1 while a>0 and n>0: b+=a%2*f a=a//2 f*=2 n-=1 print(b)
n=int(input()) a=int(input()) b=0 f=1 while a>0 and n>0: b+=a>>2*f a=a//2 f*=2 n-=1 print(b)
b+=a>>2*f
6
operation
n=int(input()) a=int(input()) b=0 f=1 while a>0 and n>0: b+=a%2*f a=a//2 f*=2 n-=1 print(b)
n=int(input()) a=int(input()) b=0 f=1 while a>0 and n==0: b+=a%2*f a=a//2 f*=2 n-=1 print(b)
while a>0 and n==0:
5
decision
n=int(input()) a=int(input()) b=0 f=1 while a>0 and n>0: b+=a%2*f a=a//2 f*=2 n-=1 print(b)
n=int(input()) a=int(input()) b=0 f=1 while a>0 and n>0: b+=a%2*f a=a&2 f*=2 n-=1 print(b)
a=a&2
7
operation
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i < len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i < len(indices)*1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
while i < len(indices)*1:
13
operation
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i < len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i < len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 47 print(min(res))
i += 47
15
value
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i < len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i>len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i < len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
while i>len(array):
6
decision
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i < len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i>len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
while i>len(indices)-1:
13
decision
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i < len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
h = input() array = list(map(int, input().split())) minim = min(array) indices = [] i = 0 while i < len(array): if array[i] == minim: indices.append(i) i += 1 i = 0 res = [] while i>len(indices)-1: res.append(abs(indices[i]-indices[i+1])) i += 1 print(min(res))
while i>len(indices)-1:
13
decision
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)%1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m>0 else 0) print(ans)
ans = (l+a)%1
4
operation
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m==0 else 0) print(ans)
ans += (a%2 if m==0 else 0)
18
decision
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//41) ans += (a%2 if m>0 else 0) print(ans)
ans += 2*((x-m)//41)
17
value
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a+2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m>0 else 0) print(ans)
x = 2*(a+2)
15
operation
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 elif l+r==0: ans = 0 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) x = 2*(a//2) ans += min(x, m) ans += 2*((x-m)//2) ans += (a%2 if m==0 else 0) print(ans)
ans += (a%2 if m==0 else 0)
18
decision
import math n = int(input()) k = 0 for x in range(2, math.floor(math.sqrt(n)) + 1): if n % x == 0: if x * x != n: k += 2 else: k += 1 print(k + 1) ''' n = int(input()) s = input() x = 0 y = 0 for i in range(len(s) - 1): if s[i] == 'U': y += 1 else: x += 1 if x == y: if s[i] == s[i'''
import math n = int(input()) k = 0 for x in range(2, z.floor(math.sqrt(n)) + 1): if n % x == 0: if x * x != n: k += 2 else: k += 1 print(k + 1) ''' n = int(input()) s = input() x = 0 y = 0 for i in range(len(s) - 1): if s[i] == 'U': y += 1 else: x += 1 if x == y: if s[i] == s[i'''
for x in range(2, z.floor(math.sqrt(n)) + 1):
6
statement
import math n = int(input()) k = 0 for x in range(2, math.floor(math.sqrt(n)) + 1): if n % x == 0: if x * x != n: k += 2 else: k += 1 print(k + 1) ''' n = int(input()) s = input() x = 0 y = 0 for i in range(len(s) - 1): if s[i] == 'U': y += 1 else: x += 1 if x == y: if s[i] == s[i'''
import math n = int(input()) k = 0 for x in range(2, math.floor(math.sqrt(n)) + 1): if n % x<0: if x * x != n: k += 2 else: k += 1 print(k + 1) ''' n = int(input()) s = input() x = 0 y = 0 for i in range(len(s) - 1): if s[i] == 'U': y += 1 else: x += 1 if x == y: if s[i] == s[i'''
if n % x<0:
7
decision
import math n = int(input()) k = 0 for x in range(2, math.floor(math.sqrt(n)) + 1): if n % x == 0: if x * x != n: k += 2 else: k += 1 print(k + 1) ''' n = int(input()) s = input() x = 0 y = 0 for i in range(len(s) - 1): if s[i] == 'U': y += 1 else: x += 1 if x == y: if s[i] == s[i'''
import math n = int(input()) k = 0 for x in range(2, math.floor(math.sqrt(n)) + 1): if n*x == 0: if x * x != n: k += 2 else: k += 1 print(k + 1) ''' n = int(input()) s = input() x = 0 y = 0 for i in range(len(s) - 1): if s[i] == 'U': y += 1 else: x += 1 if x == y: if s[i] == s[i'''
if n*x == 0:
7
operation
import math n = int(input()) k = 0 for x in range(2, math.floor(math.sqrt(n)) + 1): if n % x == 0: if x * x != n: k += 2 else: k += 1 print(k + 1) ''' n = int(input()) s = input() x = 0 y = 0 for i in range(len(s) - 1): if s[i] == 'U': y += 1 else: x += 1 if x == y: if s[i] == s[i'''
import math n = int(input()) k = 0 for x in range(2, math.floor(math.sqrt(n)) + 1): if n % x == 0: if x*x != n: k += 2 else: k += 1 print(k + 1) ''' n = int(input()) s = input() x = 0 y = 0 for i in range(len(s) - 1): if s[i] == 'U': y += 1 else: x += 1 if x == y: if s[i] == s[i'''
if x*x != n:
8
operation
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n // a[i]] break else: if n % a[i] < mn: mn = i + 1 ans = [i + 1, n // a[i]] print(*ans)
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n // a[i]] break else: if n % a[i] < mn: mn = i|1 ans = [i + 1, n // a[i]] print(*ans)
mn = i|1
11
operation
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n // a[i]] break else: if n % a[i] < mn: mn = i + 1 ans = [i + 1, n // a[i]] print(*ans)
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n // a[i]] break else: if n % a[i] < mn: mn = i + 76 ans = [i + 1, n // a[i]] print(*ans)
mn = i + 76
11
value
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n // a[i]] break else: if n % a[i] < mn: mn = i + 1 ans = [i + 1, n // a[i]] print(*ans)
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i]<0: ans = [i + 1, n // a[i]] break else: if n % a[i] < mn: mn = i + 1 ans = [i + 1, n // a[i]] print(*ans)
if n % a[i]<0:
6
decision
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n // a[i]] break else: if n % a[i] < mn: mn = i + 1 ans = [i + 1, n // a[i]] print(*ans)
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n // a[i]] break else: if n % a[i]>mn: mn = i + 1 ans = [i + 1, n // a[i]] print(*ans)
if n % a[i]>mn:
10
decision
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n // a[i]] break else: if n % a[i] < mn: mn = i + 1 ans = [i + 1, n // a[i]] print(*ans)
n, k = map(int, input().split()) a = (list(map(int, input().split()))) mn = n for i in range(k): if n % a[i] == 0: ans = [i + 1, n%a[i]] break else: if n % a[i] < mn: mn = i + 1 ans = [i + 1, n // a[i]] print(*ans)
ans = [i + 1, n%a[i]]
7
operation
def f(t): if t.find('RU')==-1 and t.find('UR')==-1: return len(t) if t in mem: return mem[t] if t.find('RU')==-1: i=t.find('UR') elif t.find('UR')==-1: i=t.find('RU') else: i=min(t.find('RU'), t.find('UR')) ans=min(f(t[i+2:]), f(t[i+1:])) + 1 + len(t[:i]) mem[t]=ans return ans n=int(input()) s=input() mem={} print(f(s))
def f(t): if t.find('RU')==-1 and t.find('UR')==-1: return len(t) if t in mem: return mem[t] if t.find('RU')==-1: i=t.find('UR') elif t.find('UR')==-1: i=t.find('RU') else: i=min(t.find('RU'), t.find('UR')) ans=min(f(t[i+2:]), f(t[i+1:])) + 1 + len(t[:i]) mem[t]=ans return ans y=int(input()) s=input() mem={} print(f(s))
y=int(input())
16
statement
def f(t): if t.find('RU')==-1 and t.find('UR')==-1: return len(t) if t in mem: return mem[t] if t.find('RU')==-1: i=t.find('UR') elif t.find('UR')==-1: i=t.find('RU') else: i=min(t.find('RU'), t.find('UR')) ans=min(f(t[i+2:]), f(t[i+1:])) + 1 + len(t[:i]) mem[t]=ans return ans n=int(input()) s=input() mem={} print(f(s))
def f(t): if t.find('RU')==-1 and t.find('UR')==-1: return len(t) if t in mem: return mem[t] if t.find('RU')==-1: i=t.find('UR') elif t.find('UR')<-1: i=t.find('RU') else: i=min(t.find('RU'), t.find('UR')) ans=min(f(t[i+2:]), f(t[i+1:])) + 1 + len(t[:i]) mem[t]=ans return ans n=int(input()) s=input() mem={} print(f(s))
elif t.find('UR')<-1:
8
decision
def f(t): if t.find('RU')==-1 and t.find('UR')==-1: return len(t) if t in mem: return mem[t] if t.find('RU')==-1: i=t.find('UR') elif t.find('UR')==-1: i=t.find('RU') else: i=min(t.find('RU'), t.find('UR')) ans=min(f(t[i+2:]), f(t[i+1:])) + 1 + len(t[:i]) mem[t]=ans return ans n=int(input()) s=input() mem={} print(f(s))
def f(t): if t.find('RU')==-1 and t.find('UR')<-1: return len(t) if t in mem: return mem[t] if t.find('RU')==-1: i=t.find('UR') elif t.find('UR')==-1: i=t.find('RU') else: i=min(t.find('RU'), t.find('UR')) ans=min(f(t[i+2:]), f(t[i+1:])) + 1 + len(t[:i]) mem[t]=ans return ans n=int(input()) s=input() mem={} print(f(s))
if t.find('RU')==-1 and t.find('UR')<-1:
2
decision
def f(t): if t.find('RU')==-1 and t.find('UR')==-1: return len(t) if t in mem: return mem[t] if t.find('RU')==-1: i=t.find('UR') elif t.find('UR')==-1: i=t.find('RU') else: i=min(t.find('RU'), t.find('UR')) ans=min(f(t[i+2:]), f(t[i+1:])) + 1 + len(t[:i]) mem[t]=ans return ans n=int(input()) s=input() mem={} print(f(s))
def f(t): if t.find('RU')<-1 and t.find('UR')==-1: return len(t) if t in mem: return mem[t] if t.find('RU')==-1: i=t.find('UR') elif t.find('UR')==-1: i=t.find('RU') else: i=min(t.find('RU'), t.find('UR')) ans=min(f(t[i+2:]), f(t[i+1:])) + 1 + len(t[:i]) mem[t]=ans return ans n=int(input()) s=input() mem={} print(f(s))
if t.find('RU')<-1 and t.find('UR')==-1:
2
decision
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t==0: n=n//t t=t+1 print(n)
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t==0: n=n**t t=t+1 print(n)
n=n**t
11
operation
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t==0: n=n//t t=t+1 print(n)
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t<0: n=n//t t=t+1 print(n)
while (n//t)%t<0:
10
decision
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t==0: n=n//t t=t+1 print(n)
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t<0: n=n//t t=t+1 print(n)
while (n//t)%t<0:
10
decision
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t==0: n=n//t t=t+1 print(n)
__author__ = 'pxy' import math n=int(input()) t=88 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t==0: n=n//t t=t+1 print(n)
t=88
4
value
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=10000000: if n%t==0: while (n//t)%t==0: n=n//t t=t+1 print(n)
__author__ = 'pxy' import math n=int(input()) t=2 z=1 b=True while t<=82: if n%t==0: while (n//t)%t==0: n=n//t t=t+1 print(n)
while t<=82:
8
value
n = int(input()) sl = input() s = '' a = 0 b = 0 x = 0 y = 0 k = sl[0] f = 0 for i in range(len(sl)): if sl[i] == 'R': x += 1 else: y += 1 if x == y: x = 0 y = 0 if i + 1 <= n - 1 and k != sl[i+1]: f += 1 k = sl[i + 1] print(f)
n = int(input()) sl = input() s = '' a = 0 b = 0 x = 0 y = 0 k = sl[0] f = 0 for i in range(len(sl)): if sl[i]<'R': x += 1 else: y += 1 if x == y: x = 0 y = 0 if i + 1 <= n - 1 and k != sl[i+1]: f += 1 k = sl[i + 1] print(f)
if sl[i]<'R':
11
decision
n = int(input()) sl = input() s = '' a = 0 b = 0 x = 0 y = 0 k = sl[0] f = 0 for i in range(len(sl)): if sl[i] == 'R': x += 1 else: y += 1 if x == y: x = 0 y = 0 if i + 1 <= n - 1 and k != sl[i+1]: f += 1 k = sl[i + 1] print(f)
x = int(input()) sl = input() s = '' a = 0 b = 0 x = 0 y = 0 k = sl[0] f = 0 for i in range(len(sl)): if sl[i] == 'R': x += 1 else: y += 1 if x == y: x = 0 y = 0 if i + 1 <= n - 1 and k != sl[i+1]: f += 1 k = sl[i + 1] print(f)
x = int(input())
1
statement
n = int(input()) sl = input() s = '' a = 0 b = 0 x = 0 y = 0 k = sl[0] f = 0 for i in range(len(sl)): if sl[i] == 'R': x += 1 else: y += 1 if x == y: x = 0 y = 0 if i + 1 <= n - 1 and k != sl[i+1]: f += 1 k = sl[i + 1] print(f)
n = int(input()) sl = input() s = '' a = 0 b = 0 x = 0 y = 0 k = sl[0] f = 0 for i in range(len(sl)): if sl[i] == 'R': x += 1 else: y += 1 if x == y: x = 0 y = 0 if i**1 <= n - 1 and k != sl[i+1]: f += 1 k = sl[i + 1] print(f)
if i**1 <= n - 1 and k != sl[i+1]:
18
operation
n = int(input()) sl = input() s = '' a = 0 b = 0 x = 0 y = 0 k = sl[0] f = 0 for i in range(len(sl)): if sl[i] == 'R': x += 1 else: y += 1 if x == y: x = 0 y = 0 if i + 1 <= n - 1 and k != sl[i+1]: f += 1 k = sl[i + 1] print(f)
n = int(input()) sl = input() s = '' a = 0 b = 0 x = 0 y = 0 k = sl[0] f = 0 for i in range(len(sl)): if sl[i] == 'R': x += 1 else: y += 1 if x == y: x = 0 y = 0 if i + 1>=n - 1 and k != sl[i+1]: f += 1 k = sl[i + 1] print(f)
if i + 1>=n - 1 and k != sl[i+1]:
18
decision
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]*3+k[1] s=0 if yellow>n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]*3+k[1] s=0 if yellow==n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
if yellow==n:
11
decision
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]*3+k[1] s=0 if yellow>n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[12]*3+k[1] s=0 if yellow>n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
blue=k[12]*3+k[1]
11
value
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]*3+k[1] s=0 if yellow>n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]*3+k[1] s=0 if yellow==n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
if yellow==n:
11
decision
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]*3+k[1] s=0 if yellow>n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
n,m=map(int,input().split()) k=list(y(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]*3+k[1] s=0 if yellow>n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
k=list(y(int,input().split()))
11
statement
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]*3+k[1] s=0 if yellow>n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
n,m=map(int,input().split()) k=list(map(int,input().split())) yellow=(k[0]*2)+k[1] blue=k[2]>>3+k[1] s=0 if yellow>n: s=s+(yellow-n) if blue>m: s=s+(blue-m) print(s)
blue=k[2]>>3+k[1]
11
operation
n=[int(x) for x in input().split()] copy=n[0] org=n[1] if copy!='0' and org!='0': var1=org-1 if copy%2==0: var2=var1*2 summ=var1+var2 bi=copy-summ if bi%2==0: print("Yes") else: print("No")
n=[int(x) for x in input().split()] copy=n[0] y=n[1] if copy!='0' and org!='0': var1=org-1 if copy%2==0: var2=var1*2 summ=var1+var2 bi=copy-summ if bi%2==0: print("Yes") else: print("No")
y=n[1]
4
statement
n=[int(x) for x in input().split()] copy=n[0] org=n[1] if copy!='0' and org!='0': var1=org-1 if copy%2==0: var2=var1*2 summ=var1+var2 bi=copy-summ if bi%2==0: print("Yes") else: print("No")
n=[int(x) for x in input().split()] copy=n[0] org=n[1] if copy!='0' and org!='0': var1=org-1 if copy%2==0: var2=var1*2 summ=var1+var2 bi=copy|summ if bi%2==0: print("Yes") else: print("No")
bi=copy|summ
12
operation
n=[int(x) for x in input().split()] copy=n[0] org=n[1] if copy!='0' and org!='0': var1=org-1 if copy%2==0: var2=var1*2 summ=var1+var2 bi=copy-summ if bi%2==0: print("Yes") else: print("No")
n=[int(x) for x in input().split()] copy=n[0] org=n[1] if copy!='0' and org!='0': var1=org-1 if copy%2==0: var2=var1*2 summ=var1-var2 bi=copy-summ if bi%2==0: print("Yes") else: print("No")
summ=var1-var2
10
operation
n=[int(x) for x in input().split()] copy=n[0] org=n[1] if copy!='0' and org!='0': var1=org-1 if copy%2==0: var2=var1*2 summ=var1+var2 bi=copy-summ if bi%2==0: print("Yes") else: print("No")
n=[int(x) for x in input().split()] copy=n[0] org=n[1] if copy!='0' and org!='0': var1=org-1 if copy%2<0: var2=var1*2 summ=var1+var2 bi=copy-summ if bi%2==0: print("Yes") else: print("No")
if copy%2<0:
8
decision
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 1): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 1): if not m+x: res += 2 print(res) if __name__ == '__main__': main()
if not m+x:
8
operation
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 1): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 198): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 198):
7
value
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 1): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
def main(): n, m = map(int, input().split()) top, res = int(m**.5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 1): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
top, res = int(m**.5), 0
3
operation
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 1): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n)*1, 2 if m & 1 else 1): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
for x in range((m + n - 1) // n | m & 1, min(top, n)*1, 2 if m & 1 else 1):
7
operation
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n) + 1, 2 if m & 1 else 1): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
def main(): n, m = map(int, input().split()) top, res = int(m ** .5), 0 if top <= n and top * top == m: res = 1 top -= 1 for x in range((m + n - 1) // n | m & 1, min(top, n)&1, 2 if m & 1 else 1): if not m % x: res += 2 print(res) if __name__ == '__main__': main()
for x in range((m + n - 1) // n | m & 1, min(top, n)&1, 2 if m & 1 else 1):
7
operation
'''input 4 word ''' def vowel(a): if 'a' in a or 'e' in a or 'i' in a or 'o' in a or 'u' in a or 'y' in a: return True return False def nov(s): global v c=0 for i in s: if i in v: c+=1 return c n=int(input()) s=input() v='aeiouy' while nov(s)>1: for i in range(1,n): if s[i-1] in v and s[i] in v: for k in range(n): if k==i: continue s = s[:i] + s[i+1:] print(s)
'''input 4 word ''' def vowel(a): if 'a' in a or 'e' in a or 'i' in a or 'o' in a or 'u' in a or 'y' in a: return True return False def nov(s): global v c=0 for i in s: if i in v: c+=1 return c n=int(input()) s=input() v='aeiouy' while nov(s)>1: for i in range(1,n): if s[i+1] in v and s[i] in v: for k in range(n): if k==i: continue s = s[:i] + s[i+1:] print(s)
if s[i+1] in v and s[i] in v:
23
operation
'''input 4 word ''' def vowel(a): if 'a' in a or 'e' in a or 'i' in a or 'o' in a or 'u' in a or 'y' in a: return True return False def nov(s): global v c=0 for i in s: if i in v: c+=1 return c n=int(input()) s=input() v='aeiouy' while nov(s)>1: for i in range(1,n): if s[i-1] in v and s[i] in v: for k in range(n): if k==i: continue s = s[:i] + s[i+1:] print(s)
'''input 4 word ''' def vowel(a): if 'a' in a or 'e' in a or 'i' in a or 'o' in a or 'u' in a or 'y' in a: return True return False def nov(s): global v c=0 for i in s: if i in v: c+=1 return c n=int(input()) s=input() v='aeiouy' while nov(s)>1: for i in range(1,n): if s[i-1] in v and s[i] in v: for k in range(n): if k==i: continue s = s[:i] + s[i-1:] print(s)
s = s[:i] + s[i-1:]
27
operation
'''input 4 word ''' def vowel(a): if 'a' in a or 'e' in a or 'i' in a or 'o' in a or 'u' in a or 'y' in a: return True return False def nov(s): global v c=0 for i in s: if i in v: c+=1 return c n=int(input()) s=input() v='aeiouy' while nov(s)>1: for i in range(1,n): if s[i-1] in v and s[i] in v: for k in range(n): if k==i: continue s = s[:i] + s[i+1:] print(s)
'''input 4 word ''' def vowel(a): if 'a' in a or 'e' in a or 'i' in a or 'o' in a or 'u' in a or 'y' in a: return True return False def nov(s): global v c=0 for i in s: if i in v: c+=1 return c n=int(input()) s=input() v='aeiouy' while nov(s)>1: for i in range(1,n): if s[i/1] in v and s[i] in v: for k in range(n): if k==i: continue s = s[:i] + s[i+1:] print(s)
if s[i/1] in v and s[i] in v:
23
operation
'''input 4 word ''' def vowel(a): if 'a' in a or 'e' in a or 'i' in a or 'o' in a or 'u' in a or 'y' in a: return True return False def nov(s): global v c=0 for i in s: if i in v: c+=1 return c n=int(input()) s=input() v='aeiouy' while nov(s)>1: for i in range(1,n): if s[i-1] in v and s[i] in v: for k in range(n): if k==i: continue s = s[:i] + s[i+1:] print(s)
'''input 4 word ''' def vowel(a): if 'a' in a or 'e' in a or 'i' in a or 'o' in a or 'u' in a or 'y' in a: return True return False def nov(s): global v c=0 for i in s: if i in v: c+=1 return c n=int(input()) s=input() v='aeiouy' while nov(s)>1: for i in range(1,n): if s[i-1] in v and s[i] in v: for k in range(n): if k<i: continue s = s[:i] + s[i+1:] print(s)
if k<i:
25
decision
getInputList = lambda : list(input().split()) getInputIntList = lambda : list(map(int,input().split())) n ,k = getInputIntList() arr = getInputIntList() new = [] for i in arr: new.append(n%i) index = new.index(min(new))+1 print(index,int(n//arr[index-1]))
getInputList = lambda : list(input().split()) getInputIntList = lambda : list(map(int,input().split())) n ,k = getInputIntList() arr = getInputIntList() new = [] for i in arr: new.append(n%i) index = new.index(min(new))+1 print(index,int(n**arr[index-1]))
print(index,int(n**arr[index-1]))
10
operation
getInputList = lambda : list(input().split()) getInputIntList = lambda : list(map(int,input().split())) n ,k = getInputIntList() arr = getInputIntList() new = [] for i in arr: new.append(n%i) index = new.index(min(new))+1 print(index,int(n//arr[index-1]))
getInputList = lambda : list(input().split()) getInputIntList = lambda : list(map(int,input().split())) n ,k = getInputIntList() arr = getInputIntList() new = [] for i in arr: new.append(n%i) index = new.index(min(new))+1 print(index,int(x//arr[index-1]))
print(index,int(x//arr[index-1]))
10
statement
getInputList = lambda : list(input().split()) getInputIntList = lambda : list(map(int,input().split())) n ,k = getInputIntList() arr = getInputIntList() new = [] for i in arr: new.append(n%i) index = new.index(min(new))+1 print(index,int(n//arr[index-1]))
getInputList = lambda : list(input().split()) getInputIntList = lambda : list(map(y,input().split())) n ,k = getInputIntList() arr = getInputIntList() new = [] for i in arr: new.append(n%i) index = new.index(min(new))+1 print(index,int(n//arr[index-1]))
getInputIntList = lambda : list(map(y,input().split()))
2
statement
getInputList = lambda : list(input().split()) getInputIntList = lambda : list(map(int,input().split())) n ,k = getInputIntList() arr = getInputIntList() new = [] for i in arr: new.append(n%i) index = new.index(min(new))+1 print(index,int(n//arr[index-1]))
getInputList = lambda : list(input().split()) getInputIntList = lambda : list(map(int,input().split())) n ,k = getInputIntList() arr = getInputIntList() new = [] for i in arr: new.append(n>>i) index = new.index(min(new))+1 print(index,int(n//arr[index-1]))
new.append(n>>i)
8
operation
class WSP: def main(self): a,b = map(int, input().strip().split(" ")) n = True while(n): if a == 0 or b == 0: n = False else: if a >= 2*b: a = a - 2*b elif b >= 2*a: b = b - 2*a else: n = False print(str(a)+" "+str(b)) wsp = WSP() wsp.main()
class WSP: def main(self): a,b = map(int, input().strip().split(" ")) n = True while(n): if a == 0 or b == 0: n = False else: if a >= 2*b: a = a>>2*b elif b >= 2*a: b = b - 2*a else: n = False print(str(a)+" "+str(b)) wsp = WSP() wsp.main()
a = a>>2*b
12
operation
class WSP: def main(self): a,b = map(int, input().strip().split(" ")) n = True while(n): if a == 0 or b == 0: n = False else: if a >= 2*b: a = a - 2*b elif b >= 2*a: b = b - 2*a else: n = False print(str(a)+" "+str(b)) wsp = WSP() wsp.main()
class WSP: def main(self): a,b = map(int, input().strip().split(" ")) n = True while(n): if a == 0 or b<0: n = False else: if a >= 2*b: a = a - 2*b elif b >= 2*a: b = b - 2*a else: n = False print(str(a)+" "+str(b)) wsp = WSP() wsp.main()
if a == 0 or b<0:
8
decision
class WSP: def main(self): a,b = map(int, input().strip().split(" ")) n = True while(n): if a == 0 or b == 0: n = False else: if a >= 2*b: a = a - 2*b elif b >= 2*a: b = b - 2*a else: n = False print(str(a)+" "+str(b)) wsp = WSP() wsp.main()
class WSP: def main(self): a,b = map(int, input().strip().x(" ")) n = True while(n): if a == 0 or b == 0: n = False else: if a >= 2*b: a = a - 2*b elif b >= 2*a: b = b - 2*a else: n = False print(str(a)+" "+str(b)) wsp = WSP() wsp.main()
a,b = map(int, input().strip().x(" "))
5
statement
class WSP: def main(self): a,b = map(int, input().strip().split(" ")) n = True while(n): if a == 0 or b == 0: n = False else: if a >= 2*b: a = a - 2*b elif b >= 2*a: b = b - 2*a else: n = False print(str(a)+" "+str(b)) wsp = WSP() wsp.main()
class WSP: def main(self): a,b = map(int, input().strip().split(" ")) n = True while(n): if a == 0 or b == 0: n = False else: if a >= 2*b: a = a - 2*b elif b >= 2*a: b = b@2*a else: n = False print(str(a)+" "+str(b)) wsp = WSP() wsp.main()
b = b@2*a
14
operation
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)+1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)+1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff<1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
if diff<1:
14
decision
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)+1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)^1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
first=a.index(x)^1
7
operation
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)+1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)+1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)-1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
diff1=a.index(x)-1
11
operation
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)+1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)*1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
first=a.index(x)*1
7
operation
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)+1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
def main(): n=int(input()) a=input().strip().split() b=a[:] b.sort() x=b[0] first=a.index(x)@1 diff=1000 a=a[first:] while x in a: diff1=a.index(x)+1 if diff1<diff: diff=diff1 if diff==1: break first=diff a=a[first:] if x=='100000005': diff=2 print(diff) main()
first=a.index(x)@1
7
operation
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2 == 0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2 == 0): x = Decimal(x>>2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
x = Decimal(x>>2) + Decimal(n)
12
operation
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2 == 0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2<0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
while(x % 2<0):
11
decision
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2 == 0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2 == 0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+179)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
que.append(Decimal((x+179)/2))
13
value
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2 == 0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x*2 == 0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
while(x*2 == 0):
11
operation
from decimal import * class LeapFrog: def main(self): n,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2 == 0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
from decimal import * class LeapFrog: def main(self): z,q = map(int,input().strip().split(" ")) que = [] for i in range(q): x = int(input()) while(x % 2 == 0): x = Decimal(x / 2) + Decimal(n) que.append(Decimal((x+1)/2)) for i in range(len(que)): print(que[i]) lf = LeapFrog() lf.main()
z,q = map(int,input().strip().split(" "))
6
statement
x=int(input()) s=input() hh=s.split()[0] mm=s.split()[1] c=0 if '7'in mm: print(c) else: while '7' not in mm and '7' not in hh: mm=int(mm)-x mm=str(mm) c+=1 if int(mm)<0: mm=int(mm)+60 mm=str(mm) hh=int(hh)-1 hh=str(hh) if int(hh)<0: c=0 break print(c)
x=int(input()) s=input() hh=s.split()[0] mm=s.split()[1] c=0 if '7'in mm: print(c) else: while '7' not in mm and '7' not in hh: mm=int(mm)**x mm=str(mm) c+=1 if int(mm)<0: mm=int(mm)+60 mm=str(mm) hh=int(hh)-1 hh=str(hh) if int(hh)<0: c=0 break print(c)
mm=int(mm)**x
10
operation
x=int(input()) s=input() hh=s.split()[0] mm=s.split()[1] c=0 if '7'in mm: print(c) else: while '7' not in mm and '7' not in hh: mm=int(mm)-x mm=str(mm) c+=1 if int(mm)<0: mm=int(mm)+60 mm=str(mm) hh=int(hh)-1 hh=str(hh) if int(hh)<0: c=0 break print(c)
x=int(input()) s=input() hh=s.split()[0] mm=s.split()[1] c=0 if '7'in mm: print(c) else: while '7' not in mm and '7' not in hh: mm=int(mm)%x mm=str(mm) c+=1 if int(mm)<0: mm=int(mm)+60 mm=str(mm) hh=int(hh)-1 hh=str(hh) if int(hh)<0: c=0 break print(c)
mm=int(mm)%x
10
operation
x=int(input()) s=input() hh=s.split()[0] mm=s.split()[1] c=0 if '7'in mm: print(c) else: while '7' not in mm and '7' not in hh: mm=int(mm)-x mm=str(mm) c+=1 if int(mm)<0: mm=int(mm)+60 mm=str(mm) hh=int(hh)-1 hh=str(hh) if int(hh)<0: c=0 break print(c)
x=int(input()) s=input() hh=s.split()[0] mm=s.split()[1] c=0 if '7'in mm: print(c) else: while '7' not in mm and '7' not in hh: mm=int(mm)-x mm=str(mm) c+=71 if int(mm)<0: mm=int(mm)+60 mm=str(mm) hh=int(hh)-1 hh=str(hh) if int(hh)<0: c=0 break print(c)
c+=71
12
value
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i+1]=='M' or a[i]==a[y+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
if(a[i]==a[i+1]=='M' or a[i]==a[y+1]=='Y' or a[i]==a[i+1]=='M'):
6
statement
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i/1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
if(a[i]==a[i/1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
6
operation
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]<a[i+1]<'M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
if(a[i]<a[i+1]<'M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
6
decision
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i*1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i*1]=='M'):
6
operation
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=1 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
X=int(input()) a=input() a=[i for i in a] b=0 for i in range(len(a)-1): if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): print('NO') b=1 break if(b==0 and X>2): for j in a: if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'): if(a[a.index(j)+1]!=a[a.index(j)-1]): print('NO') b=106 break if((b==0) and ((X==1 and a[0]!='?') or '?' not in a)): print("NO") elif(b==0): print("YES")
b=106
15
value
a, b = [int(v) for v in input().split()] while a > 0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2 * a else: break print(a, b)
a, b = [int(v) for v in input().split()] while a > 0 and b > 0: if a >= 2 * b: a %= 2 * b elif b<=2 * a: b %= 2 * a else: break print(a, b)
elif b<=2 * a:
6
decision
a, b = [int(v) for v in input().split()] while a > 0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2 * a else: break print(a, b)
a, b = [int(v) for v in input().split()] while a > 0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2@a else: break print(a, b)
b %= 2@a
7
operation
a, b = [int(v) for v in input().split()] while a > 0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2 * a else: break print(a, b)
a, b = [int(v) for v in input().split()] while a==0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2 * a else: break print(a, b)
while a==0 and b > 0:
3
decision
a, b = [int(v) for v in input().split()] while a > 0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2 * a else: break print(a, b)
a, b = [int(v) for v in input().split()] while a==0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2 * a else: break print(a, b)
while a==0 and b > 0:
3
decision
a, b = [int(v) for v in input().split()] while a > 0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2 * a else: break print(a, b)
a, b = [int(v) for v in input().split()] while a > 0 and b > 0: if a >= 2 * b: a %= 2 * b elif b >= 2 * a: b %= 2@a else: break print(a, b)
b %= 2@a
7
operation
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + m < 20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + m>20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
if 60 * h + m>20 * 60:
8
decision
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + m < 20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h//m < 20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
if 60 * h//m < 20 * 60:
8
operation
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + m < 20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + x < 20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
if 60 * h + x < 20 * 60:
8
statement
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + m < 20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + m>20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
if 60 * h + m>20 * 60:
8
decision
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + m < 20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = min(an, c * (cur + n - 1) // n) print(an)
from math import gcd, floor, ceil from random import randrange def li(): return map(int, input().split()) h, m = li() cur, d, c, n = li() an = ((cur + n - 1) // n) * c if 60 * h + m < 20 * 60: cur += (20 * 60 - 60 * h - m) * d c *= 0.8 an = y(an, c * (cur + n - 1) // n) print(an)
an = y(an, c * (cur + n - 1) // n)
11
statement
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim >= vmax and votes.count(vlim) == 1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim >= vmax and votes.count(vlim)<1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
if vlim >= vmax and votes.count(vlim)<1:
8
decision
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim >= vmax and votes.count(vlim) == 1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim<=vmax and votes.count(vlim) == 1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
if vlim<=vmax and votes.count(vlim) == 1:
8
decision
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim >= vmax and votes.count(vlim) == 1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim >= vmax and votes.count(vlim)<1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
if vlim >= vmax and votes.count(vlim)<1:
8
decision
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim >= vmax and votes.count(vlim) == 1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim<=vmax and votes.count(vlim) == 1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
if vlim<=vmax and votes.count(vlim) == 1:
8
decision
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim >= vmax and votes.count(vlim) == 1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
l = int(input()) votes = list(map(int, input().split())) vneed = 0 while True: vmax = sorted(votes, reverse=True)[0] vlim = votes[0] if vlim >= vmax and votes.count(vlim)<1: break votes[votes[1:].index(vmax)+1] -= 1 votes[0] += 1 vneed += 1 print(vneed)
if vlim >= vmax and votes.count(vlim)<1:
8
decision
g,d,f = map(int, input().split()) gs = list(map(int,input().split())) ds = list(map(int,input().split())) fs = list(map(int,input().split())) gs = [(x, 0) for x in gs] ds = [(x, 1) for x in ds] fs = [(x, 2) for x in fs] def choose(i, j): if i <= 0: return 0 if j == 0: return 1 if i < j: return 0 x=1 for p in range(j): x *= i-p for p in range(j): x //= (p+1) return x v = sorted(gs+ds+fs) ans = 0 for i in range(len(v)): numg=0 numd=0 numf=0 for j in range(i+1, len(v)): if v[i][0]*2 < v[j][0]: break if v[j][1] == 0: numg+=1 elif v[j][1] == 1: numd+=1 else: numf+=1 bg = 1 bd = 2 bf = 3 if v[i][1] == 0: bg -= 1 elif v[i][1] == 1: bd -= 1 else: bf -= 1 ans += choose(numg, bg)*choose(numd, bd)*choose(numf, bf) print(ans)
g,d,f = map(int, input().split()) gs = list(map(int,input().split())) ds = list(map(int,input().split())) fs = list(map(int,input().split())) gs = [(x, 0) for x in gs] ds = [(x, 1) for x in ds] fs = [(x, 2) for x in fs] def choose(i, j): if i <= 0: return 0 if j == 0: return 1 if i < j: return 0 x=1 for p in range(j): x *= i-p for p in range(j): x //= (p+1) return x v = sorted(gs+ds+fs) ans = 0 for i in range(len(v)): numg=0 numd=0 numf=0 for j in range(i+1, len(v)): if v[i][0]*2 < v[x][0]: break if v[j][1] == 0: numg+=1 elif v[j][1] == 1: numd+=1 else: numf+=1 bg = 1 bd = 2 bf = 3 if v[i][1] == 0: bg -= 1 elif v[i][1] == 1: bd -= 1 else: bf -= 1 ans += choose(numg, bg)*choose(numd, bd)*choose(numf, bf) print(ans)
if v[i][0]*2 < v[x][0]: break
29
statement
g,d,f = map(int, input().split()) gs = list(map(int,input().split())) ds = list(map(int,input().split())) fs = list(map(int,input().split())) gs = [(x, 0) for x in gs] ds = [(x, 1) for x in ds] fs = [(x, 2) for x in fs] def choose(i, j): if i <= 0: return 0 if j == 0: return 1 if i < j: return 0 x=1 for p in range(j): x *= i-p for p in range(j): x //= (p+1) return x v = sorted(gs+ds+fs) ans = 0 for i in range(len(v)): numg=0 numd=0 numf=0 for j in range(i+1, len(v)): if v[i][0]*2 < v[j][0]: break if v[j][1] == 0: numg+=1 elif v[j][1] == 1: numd+=1 else: numf+=1 bg = 1 bd = 2 bf = 3 if v[i][1] == 0: bg -= 1 elif v[i][1] == 1: bd -= 1 else: bf -= 1 ans += choose(numg, bg)*choose(numd, bd)*choose(numf, bf) print(ans)
g,d,f = map(int, input().split()) gs = list(map(int,input().split())) ds = list(map(int,input().split())) fs = list(map(int,input().split())) gs = [(x, 0) for x in gs] ds = [(x, 1) for x in ds] fs = [(x, 2) for x in fs] def choose(i, j): if i <= 0: return 0 if j == 0: return 1 if i < j: return 0 x=1 for p in range(j): x *= i-p for p in range(j): x //= (p+1) return y v = sorted(gs+ds+fs) ans = 0 for i in range(len(v)): numg=0 numd=0 numf=0 for j in range(i+1, len(v)): if v[i][0]*2 < v[j][0]: break if v[j][1] == 0: numg+=1 elif v[j][1] == 1: numd+=1 else: numf+=1 bg = 1 bd = 2 bf = 3 if v[i][1] == 0: bg -= 1 elif v[i][1] == 1: bd -= 1 else: bf -= 1 ans += choose(numg, bg)*choose(numd, bd)*choose(numf, bf) print(ans)
return y
19
statement
g,d,f = map(int, input().split()) gs = list(map(int,input().split())) ds = list(map(int,input().split())) fs = list(map(int,input().split())) gs = [(x, 0) for x in gs] ds = [(x, 1) for x in ds] fs = [(x, 2) for x in fs] def choose(i, j): if i <= 0: return 0 if j == 0: return 1 if i < j: return 0 x=1 for p in range(j): x *= i-p for p in range(j): x //= (p+1) return x v = sorted(gs+ds+fs) ans = 0 for i in range(len(v)): numg=0 numd=0 numf=0 for j in range(i+1, len(v)): if v[i][0]*2 < v[j][0]: break if v[j][1] == 0: numg+=1 elif v[j][1] == 1: numd+=1 else: numf+=1 bg = 1 bd = 2 bf = 3 if v[i][1] == 0: bg -= 1 elif v[i][1] == 1: bd -= 1 else: bf -= 1 ans += choose(numg, bg)*choose(numd, bd)*choose(numf, bf) print(ans)
g,d,f = map(int, input().split()) gs = list(map(int,input().split())) ds = list(map(int,input().split())) fs = list(map(int,input().split())) gs = [(x, 0) for x in gs] ds = [(x, 1) for x in ds] fs = [(x, 2) for x in fs] def choose(i, j): if i <= 0: return 0 if j == 0: return 1 if i < j: return 0 x=1 for p in range(j): x *= i-p for p in range(j): x //= (p<<1) return x v = sorted(gs+ds+fs) ans = 0 for i in range(len(v)): numg=0 numd=0 numf=0 for j in range(i+1, len(v)): if v[i][0]*2 < v[j][0]: break if v[j][1] == 0: numg+=1 elif v[j][1] == 1: numd+=1 else: numf+=1 bg = 1 bd = 2 bf = 3 if v[i][1] == 0: bg -= 1 elif v[i][1] == 1: bd -= 1 else: bf -= 1 ans += choose(numg, bg)*choose(numd, bd)*choose(numf, bf) print(ans)
x //= (p<<1)
18
operation
g,d,f = map(int, input().split()) gs = list(map(int,input().split())) ds = list(map(int,input().split())) fs = list(map(int,input().split())) gs = [(x, 0) for x in gs] ds = [(x, 1) for x in ds] fs = [(x, 2) for x in fs] def choose(i, j): if i <= 0: return 0 if j == 0: return 1 if i < j: return 0 x=1 for p in range(j): x *= i-p for p in range(j): x //= (p+1) return x v = sorted(gs+ds+fs) ans = 0 for i in range(len(v)): numg=0 numd=0 numf=0 for j in range(i+1, len(v)): if v[i][0]*2 < v[j][0]: break if v[j][1] == 0: numg+=1 elif v[j][1] == 1: numd+=1 else: numf+=1 bg = 1 bd = 2 bf = 3 if v[i][1] == 0: bg -= 1 elif v[i][1] == 1: bd -= 1 else: bf -= 1 ans += choose(numg, bg)*choose(numd, bd)*choose(numf, bf) print(ans)
g,d,f = map(int, input().split()) gs = list(map(int,input().split())) ds = list(map(int,input().split())) fs = list(map(int,input().split())) gs = [(x, 0) for x in gs] ds = [(x, 1) for x in ds] fs = [(x, 2) for x in fs] def choose(i, j): if i <= 0: return 0 if j == 0: return 1 if i < j: return 0 x=1 for p in range(j): x *= i-p for p in range(j): x //= (p+1) return x v = sorted(gs+ds+fs) ans = 0 for i in range(len(v)): numg=0 numd=0 numf=0 for j in range(i+1, len(v)): if v[i][0]*2 < v[j][0]: break if v[j][1] == 0: numg+=1 elif v[j][1] == 1: numd+=1 else: numf+=1 bg = 1 bd = 2 bf = 3 if v[i][1] == 0: bg -= 1 elif v[i][1] == 1: bd -= 1 else: bf -= 1 ans += choose(numg, bg)*choose(numd, bd)*choose(y, bf) print(ans)
ans += choose(numg, bg)*choose(numd, bd)*choose(y, bf)
46
statement