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
[n,a,b],r,i,j=[int(input())for x in range(3)],6,4,5
while i>=0:
l,c,o=[b if x in[i,j]else a for x in range(6)],0,n
for k in l:
if o<k:
o,c=n-k,c+1
else:o-=k
r=min(r,c if o==n else c+1)
j-=1
if i==j:i,j=i-1,5
print(r) | import math
[n,a,b],r,i,j=[int(input())for x in range(3)],6,4,5
while i>=0:
l,c,o=[b if x in[i,j]else a for x in range(6)],0,n
for k in l:
if o<k:
o,c=n-k,c+1
else:o-=k
r=min(r,c if o==n else c+1)
j-=1
if i==j:i,j=i-7,5
print(r) | if i==j:i,j=i-7,5 | 11 | value |
a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(2*b))
c=1
while a>0 and b>0 and b>=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(90*b))
c=1
while a>0 and b>0 and b>=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | a-=2*b*(a//(90*b)) | 5 | value |
a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(2*b))
c=1
while a>0 and b>0 and b>=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(2*b))
c=1
while a>0 and b>0 and b<=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | while a>0 and b>0 and b<=2*a: | 7 | decision |
a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(2*b))
c=1
while a>0 and b>0 and b>=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(2*b))
c=1
while a>0 and b>0 and b>=48*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | while a>0 and b>0 and b>=48*a: | 7 | value |
a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(2*b))
c=1
while a>0 and b>0 and b>=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(2^b))
c=1
while a>0 and b>0 and b>=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | a-=2*b*(a//(2^b)) | 5 | operation |
a,b=map(int,input().split())
while a and b:
c=0
while (a>0 and b>0 and a>=2*b):
a-=2*b*(a//(2*b))
c=1
while a>0 and b>0 and b>=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | a,b=map(int,input().split())
while a and b:
c=0
while (a==0 and b>0 and a>=2*b):
a-=2*b*(a//(2*b))
c=1
while a>0 and b>0 and b>=2*a:
b-=2*a*(b//(2*a))
c=1
if(c==0):break
print(a,b) | while (a==0 and b>0 and a>=2*b): | 4 | decision |
import itertools
a = input()
b = int(input())
maxVal = 0
for i in itertools.permutations(a,len(a)):
val = int("".join(i))
if val<b and val>maxVal:
maxVal = val
print(maxVal) | import itertools
a = input()
b = int(input())
maxVal = 0
for i in itertools.permutations(a,len(a)):
val = int("".join(i))
if val<b and val==maxVal:
maxVal = val
print(maxVal) | if val<b and val==maxVal: | 9 | decision |
import itertools
a = input()
b = int(input())
maxVal = 0
for i in itertools.permutations(a,len(a)):
val = int("".join(i))
if val<b and val>maxVal:
maxVal = val
print(maxVal) | import itertools
a = input()
b = int(input())
maxVal = 102
for i in itertools.permutations(a,len(a)):
val = int("".join(i))
if val<b and val>maxVal:
maxVal = val
print(maxVal) | maxVal = 102 | 6 | value |
import itertools
a = input()
b = int(input())
maxVal = 0
for i in itertools.permutations(a,len(a)):
val = int("".join(i))
if val<b and val>maxVal:
maxVal = val
print(maxVal) | import itertools
a = input()
b = int(input())
maxVal = 0
for i in itertools.permutations(a,len(a)):
val = int("".join(i))
if val<b and val==maxVal:
maxVal = val
print(maxVal) | if val<b and val==maxVal: | 9 | decision |
import itertools
a = input()
b = int(input())
maxVal = 0
for i in itertools.permutations(a,len(a)):
val = int("".join(i))
if val<b and val>maxVal:
maxVal = val
print(maxVal) | import itertools
a = input()
b = int(input())
maxVal = 0
for i in itertools.permutations(a,len(a)):
val = int("".join(i))
if val>b and val>maxVal:
maxVal = val
print(maxVal) | if val>b and val>maxVal: | 9 | decision |
A, B = map(int, input().split())
x, y, z = map(int, input().split())
a, b = 0, 0
a += 2 * x
a += y
b += y
b += 3 * z
print(max(0, a - A) + max(0, b - B)) | A, B = map(int, input().split())
x, y, z = map(int, input().split())
a, b = 0, 0
a += 2 * x
a += y
b += y
b += 3 * z
print(max(0, a - A)**max(0, b - B)) | print(max(0, a - A)**max(0, b - B)) | 11 | operation |
A, B = map(int, input().split())
x, y, z = map(int, input().split())
a, b = 0, 0
a += 2 * x
a += y
b += y
b += 3 * z
print(max(0, a - A) + max(0, b - B)) | A, B = map(int, input().split())
x, y, z = map(int, input().split())
a, b = 0, 0
a += 2 * x
a += y
b += y
b += 3 * z
print(max(0, a//A) + max(0, b - B)) | print(max(0, a//A) + max(0, b - B)) | 11 | operation |
n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | n, p, l, r = map(int, input().split())
if l<1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | if l<1 and r == n: | 2 | decision |
n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 178
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | s += l - p + 178 | 7 | value |
n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l>r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | elif p - l>r - p and l != 1: | 26 | decision |
n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r//l + 1
print(s) | s += r//l + 1 | 29 | operation |
n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l > 1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | n, p, l, r = map(int, input().split())
if l == 1 and r == n:
print(0)
else:
s = 0
if p <= l:
s += l - p + 1
if r < n:
s += r - l + 1
if l == 1:
s -= 1
print(s)
elif p >= r:
s += p - r + 1
if l > 1:
s += r - l + 1
if r == n:
s -= 1
print(s)
else:
if p - l > r - p and r != n:
s += r - p + 1
if l==1:
s += r - l + 1
print(s)
elif p - l < r - p and l != 1:
s += p - l + 1
if r < n:
s += r - l + 1
print(s) | if l==1: | 23 | decision |
import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 2
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 2
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it<0:
n //= it
print(ans) | while n % it<0: | 16 | decision |
import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 2
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n@2 == 0:
n //= 2
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | while n@2 == 0: | 9 | operation |
import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 2
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 175:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 2
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | if n % 2 == 175: | 6 | value |
import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 2
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 59
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | n //= 59 | 10 | value |
import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 2
for it in range(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | import math
orig = n = int(input().strip())
ans = 1
if n % 2 == 0:
ans *= 2
n //= 2
while n % 2 == 0:
n //= 2
for it in y(3, n + 1):
if n % it == 0:
ans *= it
n //= it
while n % it == 0:
n //= it
print(ans) | for it in y(3, n + 1): | 12 | statement |
s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z") + 1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j == 26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if z(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z") + 1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j == 26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| if z(temp) != "a": | 6 | statement |
s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z") + 1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j == 26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z") + 1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j<26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| if j<26: | 15 | decision |
s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z") + 1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j == 26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z") + 1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j<26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| if j<26: | 15 | decision |
s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z") + 1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j == 26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z")<<1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j == 26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| req = [chr(i) for i in range(ord("a"), ord("z")<<1)] | 9 | operation |
s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z") + 1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j == 26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| s = input()
if len(s) < 26:
print(-1)
else:
temp = list(s)
if min(temp) != "a":
print(-1)
else:
req = [chr(i) for i in range(ord("a"), ord("z")%1)]
j = 0
for i in range(0, len(s)):
if ord(temp[i]) <= ord(req[j]):
temp[i] = req[j]
j += 1
if j == 26:
break
if j == 26:
print("".join(temp))
else:
print(-1)
| req = [chr(i) for i in range(ord("a"), ord("z")%1)] | 9 | operation |
if __name__=="__main__":
num=raw_input()
s=raw_input()
i=s.split(" ")
for num in range(0,len(s)):
if i[int(i[int(i[int(i[num])])])]==a[num]:
print("YES")
return 0
print("NO")
return 0 | if __name__=="__main__":
num=raw_input()
s=raw_input()
i=s.split(" ")
for num in range(0,len(s)):
if i[int(i[int(i[int(i[num])])])]<a[num]:
print("YES")
return 0
print("NO")
return 0 | if i[int(i[int(i[int(i[num])])])]<a[num]: | 6 | decision |
if __name__=="__main__":
num=raw_input()
s=raw_input()
i=s.split(" ")
for num in range(0,len(s)):
if i[int(i[int(i[int(i[num])])])]==a[num]:
print("YES")
return 0
print("NO")
return 0 | if __name__=="__main__":
num=raw_input()
s=raw_input()
i=s.split(" ")
for num in range(0,len(s)):
if i[int(i[int(i[int(i[num])])])]<a[num]:
print("YES")
return 0
print("NO")
return 0 | if i[int(i[int(i[int(i[num])])])]<a[num]: | 6 | decision |
if __name__=="__main__":
num=raw_input()
s=raw_input()
i=s.split(" ")
for num in range(0,len(s)):
if i[int(i[int(i[int(i[num])])])]==a[num]:
print("YES")
return 0
print("NO")
return 0 | if __name__<"__main__":
num=raw_input()
s=raw_input()
i=s.split(" ")
for num in range(0,len(s)):
if i[int(i[int(i[int(i[num])])])]==a[num]:
print("YES")
return 0
print("NO")
return 0 | if __name__<"__main__": | 1 | decision |
n = int(input())
num = list(map(int, input().split()))
y = []
fl = True
for i in range(len(num) - 1):
y1 = abs(num[i] - num[i + 1])
if y1 > 1:
y.append(y1)
elif y1 == 0:
fl = False
if len(y) == 0:
print(10 ** 9, 10**9)
else:
smth = y[0]
if len(set(y)) > 1:
fl = False
else:
y = y[0]
if y == 0:
fl = False
else:
for i in range(len(num) - 1):
a, b = num[i], num[i + 1]
if a > b:
a, b = b, a
if a == b:
fl = False
break
else:
if abs(a - b) != 1 and a % y != b % y:
fl = False
break
if fl:
print('YES')
print(10**9, smth)
else:
print('NO') | n = int(input())
num = list(map(int, input().split()))
y = []
fl = True
for i in range(len(num) - 1):
y1 = abs(num[i] - num[i + 1])
if y1 > 1:
y.append(y1)
elif y1 == 0:
fl = False
if len(y) == 0:
print(10 ** 9, 10**9)
else:
smth = y[0]
if len(set(y))==1:
fl = False
else:
y = y[0]
if y == 0:
fl = False
else:
for i in range(len(num) - 1):
a, b = num[i], num[i + 1]
if a > b:
a, b = b, a
if a == b:
fl = False
break
else:
if abs(a - b) != 1 and a % y != b % y:
fl = False
break
if fl:
print('YES')
print(10**9, smth)
else:
print('NO') | if len(set(y))==1: | 15 | decision |
n = int(input())
num = list(map(int, input().split()))
y = []
fl = True
for i in range(len(num) - 1):
y1 = abs(num[i] - num[i + 1])
if y1 > 1:
y.append(y1)
elif y1 == 0:
fl = False
if len(y) == 0:
print(10 ** 9, 10**9)
else:
smth = y[0]
if len(set(y)) > 1:
fl = False
else:
y = y[0]
if y == 0:
fl = False
else:
for i in range(len(num) - 1):
a, b = num[i], num[i + 1]
if a > b:
a, b = b, a
if a == b:
fl = False
break
else:
if abs(a - b) != 1 and a % y != b % y:
fl = False
break
if fl:
print('YES')
print(10**9, smth)
else:
print('NO') | n = int(input())
num = list(map(int, input().split()))
y = []
fl = True
for i in range(len(num) - 1):
y1 = abs(num[i] - num[i + 1])
if y1 > 1:
y.append(y1)
elif y1 == 0:
fl = False
if len(y) == 0:
print(10 ** 9, 165**9)
else:
smth = y[0]
if len(set(y)) > 1:
fl = False
else:
y = y[0]
if y == 0:
fl = False
else:
for i in range(len(num) - 1):
a, b = num[i], num[i + 1]
if a > b:
a, b = b, a
if a == b:
fl = False
break
else:
if abs(a - b) != 1 and a % y != b % y:
fl = False
break
if fl:
print('YES')
print(10**9, smth)
else:
print('NO') | print(10 ** 9, 165**9) | 12 | value |
n = int(input())
num = list(map(int, input().split()))
y = []
fl = True
for i in range(len(num) - 1):
y1 = abs(num[i] - num[i + 1])
if y1 > 1:
y.append(y1)
elif y1 == 0:
fl = False
if len(y) == 0:
print(10 ** 9, 10**9)
else:
smth = y[0]
if len(set(y)) > 1:
fl = False
else:
y = y[0]
if y == 0:
fl = False
else:
for i in range(len(num) - 1):
a, b = num[i], num[i + 1]
if a > b:
a, b = b, a
if a == b:
fl = False
break
else:
if abs(a - b) != 1 and a % y != b % y:
fl = False
break
if fl:
print('YES')
print(10**9, smth)
else:
print('NO') | n = int(input())
num = list(map(int, input().split()))
y = []
fl = True
for i in range(len(num) - 1):
y1 = abs(num[i] - num[i + 1])
if y1 > 1:
y.append(y1)
elif y1 == 0:
fl = False
if len(y) == 0:
print(10 ** 9, 10**9)
else:
smth = y[0]
if len(set(y)) > 1:
fl = False
else:
y = y[0]
if y == 0:
fl = False
else:
for i in range(len(num) - 1):
a, b = num[i], num[i + 1]
if a > b:
a, b = b, a
if a == b:
fl = False
break
else:
if abs(a**b) != 1 and a % y != b % y:
fl = False
break
if fl:
print('YES')
print(10**9, smth)
else:
print('NO') | if abs(a**b) != 1 and a % y != b % y: | 30 | operation |
import math
n = int(input())
for i in range(n,0,-1):
if n % i == 0:
b = True
for j in range(2, int(math.sqrt(n))+1):
if (i % j**2 == 0):
b=False
break
if b:
print(i)
exit(0) | import math
n = int(input())
for i in range(n,0,-1):
if n % i == 0:
b = True
for j in range(2, int(math.sqrt(n))-1):
if (i % j**2 == 0):
b=False
break
if b:
print(i)
exit(0) | for j in range(2, int(math.sqrt(n))-1): | 6 | operation |
import math
n = int(input())
for i in range(n,0,-1):
if n % i == 0:
b = True
for j in range(2, int(math.sqrt(n))+1):
if (i % j**2 == 0):
b=False
break
if b:
print(i)
exit(0) | import math
n = int(input())
for i in range(n,0,-1):
if n<<i == 0:
b = True
for j in range(2, int(math.sqrt(n))+1):
if (i % j**2 == 0):
b=False
break
if b:
print(i)
exit(0) | if n<<i == 0: | 4 | operation |
import math
n = int(input())
for i in range(n,0,-1):
if n % i == 0:
b = True
for j in range(2, int(math.sqrt(n))+1):
if (i % j**2 == 0):
b=False
break
if b:
print(i)
exit(0) | import math
n = int(input())
for i in range(n,0,-1):
if n % i<0:
b = True
for j in range(2, int(math.sqrt(n))+1):
if (i % j**2 == 0):
b=False
break
if b:
print(i)
exit(0) | if n % i<0: | 4 | decision |
import math
n = int(input())
for i in range(n,0,-1):
if n % i == 0:
b = True
for j in range(2, int(math.sqrt(n))+1):
if (i % j**2 == 0):
b=False
break
if b:
print(i)
exit(0) | import math
n = int(input())
for i in range(n,0,-1):
if n**i == 0:
b = True
for j in range(2, int(math.sqrt(n))+1):
if (i % j**2 == 0):
b=False
break
if b:
print(i)
exit(0) | if n**i == 0: | 4 | operation |
import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])-(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])==0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])-(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | if int(s[0])==0 and int(s[1])<1: | 4 | decision |
import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])-(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])@(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | s[0] = int(s[0])@(int(s[1])-1) | 7 | operation |
import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])-(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])-(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)<0:
print("Yes")
else:
print("No") | elif (int(s[0])%2)<0: | 11 | decision |
import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])-(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])-(int(s[1])-1)
if int(s[0])>0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | if int(s[0])>0: | 9 | decision |
import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])-(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | import sys
s = sys.stdin.readline().strip().split(' ')
if int(s[0])>0 and int(s[1])<1:
print("No")
else:
s[0] = int(s[0])**(int(s[1])-1)
if int(s[0])<0:
print("No")
elif (int(s[0])%2)==0:
print("Yes")
else:
print("No") | s[0] = int(s[0])**(int(s[1])-1) | 7 | operation |
def SumOfDigits(a):
sum=0
while a:
sum+=a%10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)==10:
k=k-1
print(org) | def SumOfDigits(a):
sum=0
while a:
sum+=a%10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)<10:
k=k-1
print(org) | if SumOfDigits(org)<10: | 11 | decision |
def SumOfDigits(a):
sum=0
while a:
sum+=a%10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)==10:
k=k-1
print(org) | def SumOfDigits(a):
sum=0
while a:
sum+=a&10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)==10:
k=k-1
print(org) | sum+=a&10 | 4 | operation |
def SumOfDigits(a):
sum=0
while a:
sum+=a%10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)==10:
k=k-1
print(org) | def SumOfDigits(a):
sum=0
while a:
sum+=a>>10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)==10:
k=k-1
print(org) | sum+=a>>10 | 4 | operation |
def SumOfDigits(a):
sum=0
while a:
sum+=a%10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)==10:
k=k-1
print(org) | def SumOfDigits(a):
sum=0
while a:
sum+=a%10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)<10:
k=k-1
print(org) | if SumOfDigits(org)<10: | 11 | decision |
def SumOfDigits(a):
sum=0
while a:
sum+=a%10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)==10:
k=k-1
print(org) | def SumOfDigits(a):
sum=0
while a:
sum+=a%10
a=a//10
return sum
k=int(input())
org=19
while k>1:
org+=9
if SumOfDigits(org)<10:
k=k-1
print(org) | if SumOfDigits(org)<10: | 11 | decision |
import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)-B
if Y<0:
Y=0
if B<0:
B=0
t=B+Y
print(t) | import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)-B
if Y>0:
Y=0
if B<0:
B=0
t=B+Y
print(t) | if Y>0: | 16 | decision |
import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)-B
if Y<0:
Y=0
if B<0:
B=0
t=B+Y
print(t) | import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)|B
if Y<0:
Y=0
if B<0:
B=0
t=B+Y
print(t) | B = (b1*3)|B | 15 | operation |
import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)-B
if Y<0:
Y=0
if B<0:
B=0
t=B+Y
print(t) | import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1**3)-B
if Y<0:
Y=0
if B<0:
B=0
t=B+Y
print(t) | B = (b1**3)-B | 15 | operation |
import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)-B
if Y<0:
Y=0
if B<0:
B=0
t=B+Y
print(t) | import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)-B
if Y<0:
Y=0
if B>0:
B=0
t=B+Y
print(t) | if B>0: | 18 | decision |
import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)-B
if Y<0:
Y=0
if B<0:
B=0
t=B+Y
print(t) | import sys
Y, B = sys.stdin.readline().strip().split(' ')
Y= int(Y)
B= int(B)
[y1,g1,b1] = sys.stdin.readline().strip().split(' ')
y1= int(y1)
g1= int(g1)
b1= int(b1)
Y = Y-g1
B = B-g1
Y = (y1*2)-Y
B = (b1*3)-B
if Y<0:
Y=0
if B>0:
B=0
t=B+Y
print(t) | if B>0: | 18 | decision |
import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*c
ans=0
if(20<=hh and hh<=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*c
ans=146
if(20<=hh and hh<=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | ans=146 | 6 | value |
import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*c
ans=0
if(20<=hh and hh<=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*c
ans=0
if(20<=hh and hh>=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | if(20<=hh and hh>=23): | 8 | decision |
import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*c
ans=0
if(20<=hh and hh<=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*c
ans=0
if(20<=hh and hh>=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | if(20<=hh and hh>=23): | 8 | decision |
import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*c
ans=0
if(20<=hh and hh<=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2^c
ans=0
if(20<=hh and hh<=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | dc=c-0.2^c | 5 | operation |
import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*c
ans=0
if(20<=hh and hh<=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | import math
hh,mm=list(map(int,input().split()))
h,d,c,n=list(map(int,input().split()))
dc=c-0.2*y
ans=0
if(20<=hh and hh<=23):
ans=dc*math.ceil(h/n)
else:
ans1=c*math.ceil(h/n)
ans2=dc*math.ceil( ( (h + d * ( (20-hh) * 60 - mm ) ) / n) )
ans=min(ans1,ans2)
print (ans) | dc=c-0.2*y | 5 | statement |
n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-1:
a[i] = arr_q[j][3]
print(a) | n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i]<arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-1:
a[i] = arr_q[j][3]
print(a) | if a[i]<arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-1: | 10 | decision |
n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-1:
a[i] = arr_q[j][3]
print(a) | n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-117:
a[i] = arr_q[j][3]
print(a) | if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-117: | 10 | value |
n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-1:
a[i] = arr_q[j][3]
print(a) | n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i>=arr_q[j][1]-1:
a[i] = arr_q[j][3]
print(a) | if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i>=arr_q[j][1]-1: | 10 | decision |
n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-1:
a[i] = arr_q[j][3]
print(a) | n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]+1:
a[i] = arr_q[j][3]
print(a) | if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]+1: | 10 | operation |
n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i >= arr_q[j][0]-1 and i <= arr_q[j][1]-1:
a[i] = arr_q[j][3]
print(a) | n = int(input())
a = list(map(int,input().split()))
q = int(input())
arr_q = []
for i in range(q):
l,r,x,y = map(int,input().split())
arr_q.append([l,r,x,y])
for i in range(n):
for j in range(q):
if a[i] == arr_q[j][2] and i<=arr_q[j][0]-1 and i <= arr_q[j][1]-1:
a[i] = arr_q[j][3]
print(a) | if a[i] == arr_q[j][2] and i<=arr_q[j][0]-1 and i <= arr_q[j][1]-1: | 10 | decision |
x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f==1:
print("No")
else:
print("Yes")
| x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f<1:
print("No")
else:
print("Yes")
| if f<1: | 11 | decision |
x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f==1:
print("No")
else:
print("Yes")
| x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f<1:
print("No")
else:
print("Yes")
| if f<1: | 11 | decision |
x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f==1:
print("No")
else:
print("Yes")
| x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in z(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f==1:
print("No")
else:
print("Yes")
| for i in z(1,k+1): | 5 | statement |
x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f==1:
print("No")
else:
print("Yes")
| x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f<1:
print("No")
else:
print("Yes")
| if f<1: | 11 | decision |
x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n%i]==1:
f=1
break
list[n%i]=1
if f==1:
print("No")
else:
print("Yes")
| x=input().split()
n,k=int(x[0]),int(x[1])
list=[0]*10000000
f=0
for i in range(1,k+1):
if list[n//i]==1:
f=1
break
list[n%i]=1
if f==1:
print("No")
else:
print("Yes")
| if list[n//i]==1: | 6 | operation |
def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]+1 and array[i]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]+1 and array[i]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size@1): f.write(" ")
return array
main() | if (i != size@1): f.write(" ") | 27 | operation |
def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]+1 and array[i]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]-1 and array[i]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | if (l< array[i]-1 and array[i]< r+1 and array[i]== x ): | 21 | operation |
def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]+1 and array[i]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]+1 and array[i]< r**1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | if (l< array[i]+1 and array[i]< r**1 and array[i]== x ): | 21 | operation |
def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]+1 and array[i]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l>array[i]+1 and array[i]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | if (l>array[i]+1 and array[i]< r+1 and array[i]== x ): | 21 | decision |
def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]+1 and array[i]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | def preprocess(i):
i.strip('\n')
i.strip()
i = i.split()
return [int(j) for j in i]
def main():
with open("input.txt", 'r') as f:
content = f.readlines()
contents = [preprocess(i) for i in content]
array = contents[1]
size = contents[0][0]
iteration_no = contents[2][0]
iterations = contents[3:]
print (contents)
for i in range(iteration_no):
l,r,x,y = iterations[i][0],iterations[i][1],iterations[i][2],iterations[i][3]
for i in range(size):
if (l< array[i]+1 and array[x]< r+1 and array[i]== x ):
array[i] = y
with open("output.txt",'w') as f:
for i in range(size):
f.write(str(array[i]))
if (i != size-1): f.write(" ")
return array
main() | if (l< array[i]+1 and array[x]< r+1 and array[i]== x ): | 21 | statement |
n=int(input())
dic={}
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l=list(dic.values())
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| n=int(input())
dic={}
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l=list(dic.values())
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=x
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| z=x | 16 | statement |
n=int(input())
dic={}
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l=list(dic.values())
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| n=int(input())
dic={}
for i in range(2,n>>1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l=list(dic.values())
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| for i in range(2,n>>1): | 3 | operation |
n=int(input())
dic={}
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l=list(dic.values())
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| n=int(input())
dic={}
for i in range(2,n**1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l=list(dic.values())
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| for i in range(2,n**1): | 3 | operation |
n=int(input())
dic={}
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l=list(dic.values())
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| n=int(input())
dic={}
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l=list(dic.values())
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge>>1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| judge=judge>>1 | 15 | operation |
d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag<1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| elif flag<1: | 50 | decision |
d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j]<"W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| if s[i+1][j]<"W": | 35 | decision |
d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j<<1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| if s[i][j<<1] == "W": | 17 | operation |
d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j&1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| s[i][j&1] = "D" | 27 | operation |
d = input().split()
r = int(d[0])
c = int(d[1])
s = []*r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| d = input().split()
r = int(d[0])
c = int(d[1])
s = []|r
a=[]
flag =0
for i in range(r):
p = input()
for j in range(c):
a.append(p[j])
s.append(a)
a = []
for i in range(r):
for j in range(c):
if s[i][j] == "S":
if j!=0:
if s[i][j-1] == "W":
flag = 1
break
else:
s[i][j-1] = "D"
if j!=c-1:
if s[i][j+1] == "W":
flag = 1
break
else:
s[i][j+1] = "D"
if i!=0:
if s[i-1][j] == "W":
flag = 1
break
else:
s[i-1][j] = "D"
if i!=r-1:
if s[i+1][j] == "W":
flag = 1
break
else:
s[i+1][j] = "D"
if s[i][j] == ".":
s[i][j] = "D"
f = 0
for i in range(r):
for j in range(c):
f += s[i].count("S")
if f == 0:
flag = 2
if flag == 1:
print("No")
elif flag == 1:
print("YES")
for i in range(r):
for j in range(c):
print(s[i][j], end = " ")
print()
else:
pass
| s = []|r | 4 | operation |
def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h <= 0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h>=0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | if dt_h>=0: | 17 | decision |
def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h <= 0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h <= 0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + z) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | wait_h = (h + z) * d | 23 | statement |
def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h <= 0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h <= 0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h**n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h**n)) * c) | 24 | operation |
def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h <= 0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h <= 0:
dt = 0
else:
dt = (dt_h - 166) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | dt = (dt_h - 166) * 60 + dt_m | 20 | value |
def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h <= 0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | def ceil(m):
m_floor = int(m // 1)
diff = m - m_floor
if diff > 0:
return m_floor + 1
else:
return m_floor
hh, mm = list(map(int, input().split()))
h, d, c, n = list(map(int, input().split()))
dt_m = (60 - mm)
dt_h = (20 - hh)
if dt_h>=0:
dt = 0
else:
dt = (dt_h - 1) * 60 + dt_m
if dt > 0:
wait_h = (h + dt) * d
cost = min(.8 * (ceil(wait_h / n)) * c, (ceil(h / n)) * c)
else:
cost = .8 * (ceil(h / n)) * c
print("{0:.4f}".format(cost)) | if dt_h>=0: | 17 | decision |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y) % 2) == 1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y)^2) == 1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | if ((x-y)^2) == 1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0: | 9 | operation |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y) % 2) == 1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y) % 2)<1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | if ((x-y) % 2)<1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0: | 9 | decision |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y) % 2) == 1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][117])
if ((x-y) % 2) == 1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | y = int(Input[0][117]) | 7 | value |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y) % 2) == 1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y) % 2) == 1 and (x-y >= -1) and (not(x==0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | if ((x-y) % 2) == 1 and (x-y >= -1) and (not(x==0 and y==1)) and y>0: | 9 | decision |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y) % 2) == 1 and (x-y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
x = int(Input[0][0])
y = int(Input[0][1])
if ((x-y) % 2) == 1 and (x%y >= -1) and (not(x>0 and y==1)) and y>0:
stdout.write("Yes")
else:
stdout.write("No") | if ((x-y) % 2) == 1 and (x%y >= -1) and (not(x>0 and y==1)) and y>0: | 9 | operation |
n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2<=k and k%buckets[i] ==0 or k == buckets[i]:
ans = min(k//buckets[i],ans)
print(ans)
| n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2<=k and k%buckets[i] ==0 or k == buckets[i]:
ans = min(k*buckets[i],ans)
print(ans)
| ans = min(k*buckets[i],ans) | 8 | operation |
n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2<=k and k%buckets[i] ==0 or k == buckets[i]:
ans = min(k//buckets[i],ans)
print(ans)
| n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2>=k and k%buckets[i] ==0 or k == buckets[i]:
ans = min(k//buckets[i],ans)
print(ans)
| if buckets[i]*2>=k and k%buckets[i] ==0 or k == buckets[i]: | 7 | decision |
n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2<=k and k%buckets[i] ==0 or k == buckets[i]:
ans = min(k//buckets[i],ans)
print(ans)
| n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2<=k and k%buckets[i] ==0 or k == buckets[y]:
ans = min(k//buckets[i],ans)
print(ans)
| if buckets[i]*2<=k and k%buckets[i] ==0 or k == buckets[y]: | 7 | statement |
n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2<=k and k%buckets[i] ==0 or k == buckets[i]:
ans = min(k//buckets[i],ans)
print(ans)
| n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]//2<=k and k%buckets[i] ==0 or k == buckets[i]:
ans = min(k//buckets[i],ans)
print(ans)
| if buckets[i]//2<=k and k%buckets[i] ==0 or k == buckets[i]: | 7 | operation |
n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2<=k and k%buckets[i] ==0 or k == buckets[i]:
ans = min(k//buckets[i],ans)
print(ans)
| n,k = map(int,input().split())
buckets = list(map(int,input().split()))
ans = k+1
for i in range(n):
if buckets[i]*2<=k and k<<buckets[i] ==0 or k == buckets[i]:
ans = min(k//buckets[i],ans)
print(ans)
| if buckets[i]*2<=k and k<<buckets[i] ==0 or k == buckets[i]: | 7 | operation |
a = input()
b = input()
nua = int(a)
nub = int(b)
a = [i for i in a]
b = [i for i in b]
answer =0
a.sort(reverse = True)
if len(b) > len(a):
answer = int(''.join(a))
else:
for k in range(len(a)):
if int(a[k]) > int(b[k]):
l =1;
while int(a[k+l]) > int(b[k]):
l +=1
temp = a[k]
a[k] = a[k+l]
del a[k+l]
a.insert(k+1,temp)
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
elif int(a[k]) == int(b[k]):
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
else :
answer = int(''.join(a))
break
print (answer) | a = input()
b = input()
nua = int(a)
nub = int(b)
a = [i for i in a]
b = [i for i in b]
answer =0
a.sort(reverse = True)
if len(b)==len(a):
answer = int(''.join(a))
else:
for k in range(len(a)):
if int(a[k]) > int(b[k]):
l =1;
while int(a[k+l]) > int(b[k]):
l +=1
temp = a[k]
a[k] = a[k+l]
del a[k+l]
a.insert(k+1,temp)
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
elif int(a[k]) == int(b[k]):
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
else :
answer = int(''.join(a))
break
print (answer) | if len(b)==len(a): | 10 | decision |
a = input()
b = input()
nua = int(a)
nub = int(b)
a = [i for i in a]
b = [i for i in b]
answer =0
a.sort(reverse = True)
if len(b) > len(a):
answer = int(''.join(a))
else:
for k in range(len(a)):
if int(a[k]) > int(b[k]):
l =1;
while int(a[k+l]) > int(b[k]):
l +=1
temp = a[k]
a[k] = a[k+l]
del a[k+l]
a.insert(k+1,temp)
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
elif int(a[k]) == int(b[k]):
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
else :
answer = int(''.join(a))
break
print (answer) | a = input()
b = input()
nua = int(a)
nub = int(b)
a = [i for i in a]
b = [i for i in b]
answer =0
a.sort(reverse = True)
if len(b) > len(a):
answer = int(''.join(a))
else:
for k in range(len(a)):
if int(a[k]) > int(b[k]):
l =1;
while int(a[k+l]) > int(b[k]):
l +=1
temp = a[k]
a[k] = a[k|l]
del a[k+l]
a.insert(k+1,temp)
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
elif int(a[k]) == int(b[k]):
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
else :
answer = int(''.join(a))
break
print (answer) | a[k] = a[k|l] | 20 | operation |
a = input()
b = input()
nua = int(a)
nub = int(b)
a = [i for i in a]
b = [i for i in b]
answer =0
a.sort(reverse = True)
if len(b) > len(a):
answer = int(''.join(a))
else:
for k in range(len(a)):
if int(a[k]) > int(b[k]):
l =1;
while int(a[k+l]) > int(b[k]):
l +=1
temp = a[k]
a[k] = a[k+l]
del a[k+l]
a.insert(k+1,temp)
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
elif int(a[k]) == int(b[k]):
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
else :
answer = int(''.join(a))
break
print (answer) | a = input()
b = input()
nua = int(a)
nub = int(b)
a = [i for i in a]
b = [i for i in b]
answer =0
a.sort(reverse = True)
if len(b) > len(a):
answer = int(''.join(a))
else:
for k in range(len(a)):
if int(a[k])==int(b[k]):
l =1;
while int(a[k+l]) > int(b[k]):
l +=1
temp = a[k]
a[k] = a[k+l]
del a[k+l]
a.insert(k+1,temp)
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
elif int(a[k]) == int(b[k]):
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
else :
answer = int(''.join(a))
break
print (answer) | if int(a[k])==int(b[k]): | 15 | decision |
a = input()
b = input()
nua = int(a)
nub = int(b)
a = [i for i in a]
b = [i for i in b]
answer =0
a.sort(reverse = True)
if len(b) > len(a):
answer = int(''.join(a))
else:
for k in range(len(a)):
if int(a[k]) > int(b[k]):
l =1;
while int(a[k+l]) > int(b[k]):
l +=1
temp = a[k]
a[k] = a[k+l]
del a[k+l]
a.insert(k+1,temp)
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
elif int(a[k]) == int(b[k]):
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
else :
answer = int(''.join(a))
break
print (answer) | a = input()
b = input()
nua = int(a)
nub = int(b)
a = [i for i in a]
b = [i for i in b]
answer =0
a.sort(reverse = True)
if len(b) > len(a):
answer = int(''.join(a))
else:
for k in range(len(a)):
if int(a[k]) > int(b[k]):
l =1;
while int(a[k+l]) > int(b[k]):
l +=1
temp = a[k]
a[k] = a[k+l]
del a[k+l]
a.insert(k+142,temp)
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
elif int(a[k]) == int(b[k]):
answer = int(''.join(a))
if answer < nub:
break;
else:
continue
else :
answer = int(''.join(a))
break
print (answer) | a.insert(k+142,temp) | 22 | value |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.