problem_id
stringlengths 6
6
| buggy_code
stringlengths 8
526k
⌀ | fixed_code
stringlengths 12
526k
⌀ | labels
listlengths 0
15
⌀ | buggy_submission_id
int64 1
1.54M
⌀ | fixed_submission_id
int64 2
1.54M
⌀ | user_id
stringlengths 10
10
⌀ | language
stringclasses 9
values |
|---|---|---|---|---|---|---|---|
p02845
|
N = int(input())
A = list(map(int, input().split()))
c = [-1, -1 ,-1]
sum = 1
tmp = 0
for a in A:
sum = sum * c.count(A-1) % 1000000007
if A-1 == c[0]:
c[0] += 1
tmp = c.count(c[0] - 1) + 1
elif A-1 == c[1]:
c[1] += 1
tmp = c.count(c[1]-1) + 1
elif A-1 == c[2]:
c[2] += 1
tmp = c.count(c[2] - 1) + 1
print(sum)
|
N = int(input())
A = list(map(int, input().split()))
c = [-1, -1 ,-1]
sum = 1
tmp = 0
for a in A:
sum = sum * c.count(a-1) % 1000000007
if a-1 == c[0]:
c[0] += 1
tmp = c.count(c[0] - 1) + 1
elif a-1 == c[1]:
c[1] += 1
tmp = c.count(c[1]-1) + 1
elif a-1 == c[2]:
c[2] += 1
tmp = c.count(c[2] - 1) + 1
print(sum)
|
[
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change"
] | 652,003
| 652,004
|
u759938562
|
python
|
p02845
|
mod=1000000007
N=int(input())
A=list(map(int,input().split()))
ans=1
c1=c2=c3=0
for Ai in A:
if c1==c2==c3==Ai:
c1+=1
ans=ans*3%mod
elif c1==c2==Ai:
c1+=1
ans=ans*2%mod
elif c2==c3==Ai:
c2+=1
ans=ans*2%mod
elif c1==Ai:
c1+=1
elif c2==Ai:
c2+=1
elif c3==Ai:
c3+=1
print(ans)
|
mod=1000000007
N=int(input())
A=list(map(int,input().split()))
ans=1
c1=c2=c3=0
for Ai in A:
if c1==c2==c3==Ai:
c1+=1
ans=ans*3%mod
elif c1==c2==Ai:
c1+=1
ans=ans*2%mod
elif c2==c3==Ai:
c2+=1
ans=ans*2%mod
elif c1==Ai:
c1+=1
elif c2==Ai:
c2+=1
elif c3==Ai:
c3+=1
else:
ans=0
break
print(ans)
|
[
"control_flow.break.add"
] | 652,025
| 652,026
|
u042802884
|
python
|
p02846
|
"""from collections import *
from itertools import *
from bisect import *
from heapq import *
import math
from fractions import gcd"""
T1,T2=map(int,input().split())
A1,A2=map(int,input().split())
B1,B2=map(int,input().split())
A1*=T1
A2*=T2
B1*=T1
B2*=T2
if A1+A2==B1+B2:
print("infinity")
else:
if A1+A2<B1+B2:
A1,B1=B1,A1
A2,B2=B2,A2
if A1>B1:
print(0)
else:
print(((B1-A1)//(A1+A2-(B1+B2)))*2 +1+(((B1-A1)%(A1+A2-(B1+B2)))==0)*2)
|
"""from collections import *
from itertools import *
from bisect import *
from heapq import *
import math
from fractions import gcd"""
T1,T2=map(int,input().split())
A1,A2=map(int,input().split())
B1,B2=map(int,input().split())
A1*=T1
A2*=T2
B1*=T1
B2*=T2
if A1+A2==B1+B2:
print("infinity")
else:
if A1+A2<B1+B2:
A1,B1=B1,A1
A2,B2=B2,A2
if A1>B1:
print(0)
else:
print(((B1-A1)//(A1+A2-(B1+B2)))*2 +1-(((B1-A1)%(A1+A2-(B1+B2)))==0)*1)
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"literal.number.integer.change"
] | 652,061
| 652,062
|
u779455925
|
python
|
p02846
|
"""from collections import *
from itertools import *
from bisect import *
from heapq import *
import math
from fractions import gcd"""
T1,T2=map(int,input().split())
A1,A2=map(int,input().split())
B1,B2=map(int,input().split())
A1*=T1
A2*=T2
B1*=T1
B2*=T2
if A1+A2==B1+B2:
print("infinity")
else:
if A1+A2<B1+B2:
A1,B1=B1,A1
A2,B2=B2,A2
if A1>B1:
print(0)
else:
print(((B1-A1)//(A1+A2-(B1+B2)))*2 +1+(((B1-A1)%(A1+A2-(B1+B2)))==0)*1)
|
"""from collections import *
from itertools import *
from bisect import *
from heapq import *
import math
from fractions import gcd"""
T1,T2=map(int,input().split())
A1,A2=map(int,input().split())
B1,B2=map(int,input().split())
A1*=T1
A2*=T2
B1*=T1
B2*=T2
if A1+A2==B1+B2:
print("infinity")
else:
if A1+A2<B1+B2:
A1,B1=B1,A1
A2,B2=B2,A2
if A1>B1:
print(0)
else:
print(((B1-A1)//(A1+A2-(B1+B2)))*2 +1-(((B1-A1)%(A1+A2-(B1+B2)))==0)*1)
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,063
| 652,062
|
u779455925
|
python
|
p02846
|
t1,t2 = map(int,input().split())
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())
p1 = t1*a1
q1 = t1*b1
p2 = p1+t2*a2
q2 = q1+t2*b2
if p2 == q2:
print("infinity")
exit()
if (p1>q1 and p2>q2) or (p1<q1 and p2<q2):
print(0)
exit()
x = abs(p1-q1)
y = abs(q2-p2)
if x%y == 0:
ans = (x//y)*2-2
else:
ans = (x//y)*2+1
print(ans)
|
t1,t2 = map(int,input().split())
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())
p1 = t1*a1
q1 = t1*b1
p2 = p1+t2*a2
q2 = q1+t2*b2
if p2 == q2:
print("infinity")
exit()
if (p1>q1 and p2>q2) or (p1<q1 and p2<q2):
print(0)
exit()
x = abs(p1-q1)
y = abs(q2-p2)
if x%y == 0:
ans = (x//y)*2
else:
ans = (x//y)*2+1
print(ans)
|
[
"expression.operation.binary.remove"
] | 652,064
| 652,065
|
u905582793
|
python
|
p02846
|
T1, T2 = map(int, input().split())
A1, A2 = map(int, input().split())
B1, B2 = map(int, input().split())
C1 = A1 - B1
C2 = A2 - B2
if C1 > 0:
C1, C2 = -C1, -C2
x1 = C1 * T1 + C2 * T2
x2 = x1 + C1 * T1
if x1 == 0:
print('inifinity')
elif x1 < 0:
print(0)
else:
if 0 < x2:
count = 1
elif 0 == x2:
count = 2
else:
n = (-x2 + x1 - 1) // x1
count = 1 + 2 * n
if x2 % x1 == 0:
count += 1
print(count)
|
T1, T2 = map(int, input().split())
A1, A2 = map(int, input().split())
B1, B2 = map(int, input().split())
C1 = A1 - B1
C2 = A2 - B2
if C1 > 0:
C1, C2 = -C1, -C2
x1 = C1 * T1 + C2 * T2
x2 = x1 + C1 * T1
if x1 == 0:
print('infinity')
elif x1 < 0:
print(0)
else:
if 0 < x2:
count = 1
elif 0 == x2:
count = 2
else:
n = (-x2 + x1 - 1) // x1
count = 1 + 2 * n
if x2 % x1 == 0:
count += 1
print(count)
|
[
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 652,098
| 652,099
|
u022488946
|
python
|
p02846
|
#!/usr/bin/env python3
from itertools import combinations
import sys
input = sys.stdin.readline
MOD = 10**9 + 7
t1, t2 = [int(item) for item in input().split()]
a1, a2 = [int(item) for item in input().split()]
b1, b2 = [int(item) for item in input().split()]
a1 *= t1
b1 *= t1
a2 *= t2
b2 *= t2
if a1 + a2 == b1 + b2:
print("infinity")
exit()
if a1 + a2 > b1 + b2:
a1, a2, b1, b2 = b1, b2, a1, a2
diff = (b1 + b2) - (a1 + a2)
mid_diff = b1 - a1
if mid_diff > 0:
print(0)
else:
ans = (abs(mid_diff) + diff-1) // diff * 2 - 1
if abs(mid_diff) % diff == 0:
ans -= 1
print(ans)
|
#!/usr/bin/env python3
from itertools import combinations
import sys
input = sys.stdin.readline
MOD = 10**9 + 7
t1, t2 = [int(item) for item in input().split()]
a1, a2 = [int(item) for item in input().split()]
b1, b2 = [int(item) for item in input().split()]
a1 *= t1
b1 *= t1
a2 *= t2
b2 *= t2
if a1 + a2 == b1 + b2:
print("infinity")
exit()
if a1 + a2 > b1 + b2:
a1, a2, b1, b2 = b1, b2, a1, a2
diff = (b1 + b2) - (a1 + a2)
mid_diff = b1 - a1
if mid_diff > 0:
print(0)
else:
ans = (abs(mid_diff) + diff - 1) // diff * 2
if abs(mid_diff) % diff == 0:
ans += 1
print(ans - 1)
|
[
"expression.operation.binary.remove",
"expression.operator.change"
] | 652,129
| 652,130
|
u052499405
|
python
|
p02846
|
s,t,a,b,x,y=map(int,open(0).read().split())
i=(x-a)*s
j=(b-y)*t-i
print(max(0,i//j*2+(i%j>0))if j else'infinity')
|
s,t,a,b,x,y=map(int,open(0).read().split())
i=(x-a)*s
j=(b-y)*t-i
print(max(0,i//j*2+(i%j!=0))if j else'infinity')
|
[
"expression.operator.compare.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,155
| 652,156
|
u729133443
|
python
|
p02846
|
# -*- coding: utf-8 -*-
#mitsui f
import sys
import math
import collections
#sys.setrecursionlimit(100000)
#n=int(input())
tmp = input().split()
t1,t2 = list(map(lambda a: int(a), tmp))
tmp = input().split()
a1,a2 = list(map(lambda a: int(a), tmp))
tmp = input().split()
b1,b2 = list(map(lambda a: int(a), tmp))
if(a1*t1+a2*t2==b1*t1+b2*t2):
print("infinity")
sys.exit()
diff=a1*t1+a2*t2-b1*t1+b2*t2
if(diff>0):
c1=a1-b1
c2=a2-b2
else:
c1=b1-a1
c2=b2-a2
if(c1>0):
print("0")
sys.exit()
diff=c1*t1+c2*t2
pitch=c1*t1*-1
ans=pitch//diff*2+1
if(pitch%diff==0):
ans-=1
print(ans)
|
# -*- coding: utf-8 -*-
#mitsui f
import sys
import math
import collections
#sys.setrecursionlimit(100000)
#n=int(input())
tmp = input().split()
t1,t2 = list(map(lambda a: int(a), tmp))
tmp = input().split()
a1,a2 = list(map(lambda a: int(a), tmp))
tmp = input().split()
b1,b2 = list(map(lambda a: int(a), tmp))
if(a1*t1+a2*t2==b1*t1+b2*t2):
print("infinity")
sys.exit()
diff=(a1*t1+a2*t2)-(b1*t1+b2*t2)
if(diff>0):
c1=a1-b1
c2=a2-b2
else:
c1=b1-a1
c2=b2-a2
if(c1>0):
print("0")
sys.exit()
diff=c1*t1+c2*t2
pitch=c1*t1*-1
ans=pitch//diff*2+1
if(pitch%diff==0):
ans-=1
print(ans)
|
[] | 652,170
| 652,171
|
u707870100
|
python
|
p02846
|
t1,t2 = map(int,input().split())
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())
if a1*t1+a2*t2>=b1*t1+b2*t2:
a1,a2,b1,b2 = b1,b2,a1,a2
d = b1*t1+b2*t2 - (a1*t1+a2*t2)
if d == 0:
print('inifinity')
elif a1*t1<b1*t1:
print(0)
else:
if (a1*t1 - b1*t1)*2%d ==0:
print(((a1*t1 - b1*t1)*2)//d)
else:
print((a1*t1 - b1*t1)//d*2+1)
|
t1,t2 = map(int,input().split())
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())
if a1*t1+a2*t2>=b1*t1+b2*t2:
a1,a2,b1,b2 = b1,b2,a1,a2
d = b1*t1+b2*t2 - (a1*t1+a2*t2)
if d == 0:
print('infinity')
elif a1*t1<b1*t1:
print(0)
else:
if (a1*t1 - b1*t1)*2%d ==0:
print(((a1*t1 - b1*t1)*2+d-1)//d)
else:
print((a1*t1 - b1*t1)//d*2+1)
|
[
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 652,172
| 652,173
|
u693953100
|
python
|
p02846
|
t1,t2 = map(int,input().split())
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())
if a1*t1+a2*t2>=b1*t1+b2*t2:
a1,a2,b1,b2 = b1,b2,a1,a2
d = b1*t1+b2*t2 - (a1*t1+a2*t2)
if d == 0:
print('inifinity')
elif a1*t1<b1*t1:
print(0)
else:
if (a1*t1 - b1*t1)*2%d ==0:
print(((a1*t1 - b1*t1)*2+d-1)//d)
else:
print((a1*t1 - b1*t1)//d*2+1)
|
t1,t2 = map(int,input().split())
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())
if a1*t1+a2*t2>=b1*t1+b2*t2:
a1,a2,b1,b2 = b1,b2,a1,a2
d = b1*t1+b2*t2 - (a1*t1+a2*t2)
if d == 0:
print('infinity')
elif a1*t1<b1*t1:
print(0)
else:
if (a1*t1 - b1*t1)*2%d ==0:
print(((a1*t1 - b1*t1)*2+d-1)//d)
else:
print((a1*t1 - b1*t1)//d*2+1)
|
[
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 652,174
| 652,173
|
u693953100
|
python
|
p02846
|
t1,t2 = map(int,input().split())
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())
if a1*t1+a2*t2>=b1*t1+b2*t2:
a1,a2,b1,b2 = b1,b2,a1,a2
d = b1*t1+b2*t2 - (a1*t1+a2*t2)
print(d)
if d == 0:
print('inifinity')
elif a1*t1<b1*t1:
print(0)
else:
if (a1*t1 - b1*t1)*2%d ==0:
print(((a1*t1 - b1*t1)*2+d-1)//d)
else:
print((a1*t1 - b1*t1)//d*2+1)
|
t1,t2 = map(int,input().split())
a1,a2 = map(int,input().split())
b1,b2 = map(int,input().split())
if a1*t1+a2*t2>=b1*t1+b2*t2:
a1,a2,b1,b2 = b1,b2,a1,a2
d = b1*t1+b2*t2 - (a1*t1+a2*t2)
if d == 0:
print('infinity')
elif a1*t1<b1*t1:
print(0)
else:
if (a1*t1 - b1*t1)*2%d ==0:
print(((a1*t1 - b1*t1)*2+d-1)//d)
else:
print((a1*t1 - b1*t1)//d*2+1)
|
[
"call.remove",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 652,175
| 652,173
|
u693953100
|
python
|
p02846
|
t,T,a,A,b,B=map(int,open(0).read().split())
x,y=(b-a)*t,(A-B)*T
if y-x==0:
r="infinity"
else:
s,t=divmod(x,y-x)
r=max(0,s*2+(t>0))
print(r)
|
t,T,a,A,b,B=map(int,open(0).read().split())
x,y=(b-a)*t,(A-B)*T
if y-x==0:
r="infinity"
else:
s,t=divmod(x,y-x)
r=max(0,s*2+(t!=0))
print(r)
|
[
"expression.operator.compare.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 652,197
| 652,198
|
u941407962
|
python
|
p02846
|
t,T,a,A,b,B=map(int,open(0).read().split())
x,y=(b-a)*t,(A-B)*T
if y-x==0:
r="infinity"
else:
s,t=divmod(x,y-x)
t=0
r=max(0,s*2+bool(t))
print(r)
|
t,T,a,A,b,B=map(int,open(0).read().split())
x,y=(b-a)*t,(A-B)*T
if y-x==0:
r="infinity"
else:
s,t=divmod(x,y-x)
r=max(0,s*2+bool(t))
print(r)
|
[
"assignment.remove"
] | 652,199
| 652,200
|
u941407962
|
python
|
p02846
|
t,T,a,A,b,B=map(int,open(0).read().split())
x,y=(b-a)*t,(A-B)*T
if y-x==0:
r="infinity"
else:
s,t=divmod(x,y-x)
r=max(0,s*2+(t>0))
print(r)
|
t,T,a,A,b,B=map(int,open(0).read().split())
x,y=(b-a)*t,(A-B)*T
if y-x==0:
r="infinity"
else:
s,t=divmod(x,y-x)
r=max(0,s*2+bool(t))
print(r)
|
[
"call.add",
"call.arguments.change"
] | 652,197
| 652,200
|
u941407962
|
python
|
p02846
|
t,T,a,A,b,B=map(int, open(0).read().split())
x,y=(a-b)*t,(A-B)*T
if x+y==0:
r="infinity"
else:
s,t=divmod(-y, x+y)
r=0 if s<0 else s*2+(1 if t else 0)
print(r)
|
t,T,a,A,b,B=map(int, open(0).read().split())
x,y=(a-b)*t,(A-B)*T
if x+y==0:
r="infinity"
else:
s,t=divmod(-x, x+y)
r=0 if s<0 else s*2+(1 if t else 0)
print(r)
|
[
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 652,201
| 652,202
|
u941407962
|
python
|
p02846
|
t1,t2 = map(int, input().split())
a1,a2 = map(int, input().split())
b1,b2 = map(int, input().split())
x,y=(a1-b1)*t1 + (a2-b2)*t2, (a1-b1)*t1
if x == 0:
print("infinity")
elif x*y > 0:
print(0)
else:
s,t = divmod(abs(y), abs(x))
print(s*2+1 if t else 0)
|
t1,t2 = map(int, input().split())
a1,a2 = map(int, input().split())
b1,b2 = map(int, input().split())
x,y=(a1-b1)*t1 + (a2-b2)*t2, (a1-b1)*t1
if x == 0:
print("infinity")
elif x*y > 0:
print(0)
else:
s,t = divmod(abs(y), abs(x))
print(s*2+(1 if t else 0))
|
[
"call.arguments.change"
] | 652,203
| 652,204
|
u941407962
|
python
|
p02846
|
T1, T2 = map(int,input().split())
A1, A2 = map(int,input().split())
B1, B2 = map(int,input().split())
if T1*A1 + T2*A2 == T1*B1 + T2*B2:
print("infinity")
else:
if T1*A1 + T2*A2 > T1*B1 + T2*B2:
A1, B1 = B1, A1
A2, B2 = B2, A2
if T1*A1 < T1*B1:
print("0")
else:
forward = T1*A1 - T1*B1
shrink = (T1*B1 + T2*B2) - (T1*A1 + T2*A2)
#print(str(forward))
#print(str(shrink))
if forward % shrink == 0:
print(str(2*forward//shrink - 1 - 1))
else:
print(str((forward//shrink + 1)*2 - 1))
|
T1, T2 = map(int,input().split())
A1, A2 = map(int,input().split())
B1, B2 = map(int,input().split())
if T1*A1 + T2*A2 == T1*B1 + T2*B2:
print("infinity")
else:
if T1*A1 + T2*A2 > T1*B1 + T2*B2:
A1, B1 = B1, A1
A2, B2 = B2, A2
if T1*A1 < T1*B1:
print("0")
else:
forward = T1*A1 - T1*B1
shrink = (T1*B1 + T2*B2) - (T1*A1 + T2*A2)
#print(str(forward))
#print(str(shrink))
if forward % shrink == 0:
print(str(2*forward//shrink))
else:
print(str((forward//shrink + 1)*2 - 1))
|
[
"expression.operation.binary.remove"
] | 652,213
| 652,214
|
u882620594
|
python
|
p02847
|
s = str(input())
apple = ["SUN","MON","TUE","WED","THU","FRI","SAT","SUN"]
print(apple[apple.index(s) + 1])
|
s = str(input())
apple = ["SUN","MON","TUE","WED","THU","FRI","SAT","SUN"]
print(7-apple.index(s))
|
[] | 652,238
| 652,239
|
u701077471
|
python
|
p02847
|
D = input()
W = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7 - l.index(D))
|
D = input()
W = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7 - W.index(D))
|
[
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,244
| 652,245
|
u749614185
|
python
|
p02847
|
S = input()
week = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THR':3,'FRI':2,'SAT':1}
print(week[S])
|
S = input()
week = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
print(week[S])
|
[
"literal.string.change",
"assignment.value.change"
] | 652,251
| 652,252
|
u375193358
|
python
|
p02847
|
days = ["SUN", "MON", "TUE,","WED", "THU", "FRI", "SAT"]
s = input()
print(7-days.index(s))
|
days = ["SUN", "MON", "TUE","WED", "THU", "FRI", "SAT"]
s = input()
print(7-days.index(s))
|
[
"literal.string.change",
"assignment.value.change"
] | 652,253
| 652,254
|
u209367350
|
python
|
p02847
|
l = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
s = input()
for i, day in enumerate(l):
if day == s:
if i == 0:
print(7)
else:
print(i+1)
|
l = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
s = input()
for i, day in enumerate(l):
if day == s:
if i == 0:
print(7)
else:
print(7-i)
|
[
"expression.operation.binary.remove"
] | 652,257
| 652,258
|
u729627789
|
python
|
p02847
|
S = input()
H = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
k = S.index(S)
print(7-k)
|
S = input()
H = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
k = H.index(S)
print(7-k)
|
[
"assignment.value.change",
"identifier.change"
] | 652,259
| 652,260
|
u864276028
|
python
|
p02847
|
li=["SUN","MON","TUE","WED","THU","FRI","SAT" ]
day=input()
for i in range(6):
if(li[i]==day):
print(7-i)
|
li=["SUN","MON","TUE","WED","THU","FRI","SAT"]
day=input()
for i in range(7):
if(li[i]==day):
print(7-i)
|
[
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 652,271
| 652,272
|
u069652661
|
python
|
p02847
|
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = 7 - index(input())
print(day[S])
|
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = 7 - day.index(input())
print(S)
|
[
"call.arguments.change"
] | 652,275
| 652,276
|
u626228246
|
python
|
p02847
|
import sys
from io import StringIO
import unittest
import os
# 実装を行う関数
def resolve():
# 数値取得サンプル
# 1行N項目 x, y = map(int, input().split())
# N行N項目 x = [list(map(int, input().split())) for i in range(n)]
# 文字取得サンプル
x = input()
if x == "SUN":
print(7)
elif x == "MON":
print(6)
elif x == "TUE":
print(5)
elif x == "WED":
print(4)
elif x == "THU":
print(3)
elif x == "FRI":
print(2)
elif x == "SAT":
print(1)
# テストクラス
class TestClass(unittest.TestCase):
def assertIO(self, assert_input, output):
stdout, sat_in = sys.stdout, sys.stdin
sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
resolve()
sys.stdout.seek(0)
out = sys.stdout.read()[:-1]
sys.stdout, sys.stdin = stdout, sat_in
self.assertEqual(out, output)
def test_input_1(self):
test_input = """SAT"""
output = """1"""
self.assertIO(test_input, output)
def test_input_2(self):
test_input = """SUN"""
output = """7"""
self.assertIO(test_input, output)
# 自作テストパターンのひな形(利用時は「tes_t」のアンダーバーを削除すること
def tes_t_1original_1(self):
test_input = """データ"""
output = """データ"""
self.assertIO(test_input, output)
# 実装orテストの呼び出し
if __name__ == "__main__":
if os.environ.get("USERNAME") is None:
# AtCoder提出時の場合
unittest.main()
else:
# 自PCの場合
unittest.main()
|
import sys
from io import StringIO
import unittest
import os
# 実装を行う関数
def resolve():
# 数値取得サンプル
# 1行N項目 x, y = map(int, input().split())
# N行N項目 x = [list(map(int, input().split())) for i in range(n)]
# 文字取得サンプル
# 1行1項目 x = input()
# 数値取得サンプル
# 1行N項目 x, y = map(int, input().split())
# N行N項目 x = [list(map(int, input().split())) for i in range(n)]
# 文字取得サンプル
x = input()
if x == "SUN":
print(7)
elif x == "MON":
print(6)
elif x == "TUE":
print(5)
elif x == "WED":
print(4)
elif x == "THU":
print(3)
elif x == "FRI":
print(2)
elif x == "SAT":
print(1)
# テストクラス
class TestClass(unittest.TestCase):
def assertIO(self, assert_input, output):
stdout, sat_in = sys.stdout, sys.stdin
sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
resolve()
sys.stdout.seek(0)
out = sys.stdout.read()[:-1]
sys.stdout, sys.stdin = stdout, sat_in
self.assertEqual(out, output)
def test_input_1(self):
test_input = """SAT"""
output = """1"""
self.assertIO(test_input, output)
def test_input_2(self):
test_input = """SUN"""
output = """7"""
self.assertIO(test_input, output)
# 自作テストパターンのひな形(利用時は「tes_t」のアンダーバーを削除すること
def tes_t_1original_1(self):
test_input = """データ"""
output = """データ"""
self.assertIO(test_input, output)
# 実装orテストの呼び出し
if __name__ == "__main__":
if os.environ.get("USERNAME") is None:
# AtCoder提出時の場合
resolve()
else:
# 自PCの場合
unittest.main()
|
[] | 652,282
| 652,283
|
u550814027
|
python
|
p02847
|
s = input()
if s == 'SAT':
print(1)
elif s == 'FRI':
print(2)
elif s == 'THU':
print(3)
elif s == 'WED':
print(4)
elif s == 'TUE':
print(5)
elif s == 'Mon':
print(6)
elif s == 'SUN':
print(7)
|
s = input()
if s == 'SAT':
print(1)
elif s == 'FRI':
print(2)
elif s == 'THU':
print(3)
elif s == 'WED':
print(4)
elif s == 'TUE':
print(5)
elif s == 'MON':
print(6)
elif s == 'SUN':
print(7)
|
[
"literal.string.change",
"literal.string.case.change",
"control_flow.branch.if.condition.change"
] | 652,285
| 652,286
|
u794544096
|
python
|
p02847
|
youbi=['MON','TUE','WED','THU','FRI','SAT','SUN']
s=input()
for i in range(len(youbi)):
if s=='SUN':
print(7)
elif youbi[i]==s:
print(6-i)
|
youbi=['MON','TUE','WED','THU','FRI','SAT','SUN']
s=input()
for i in range(len(youbi)):
if s=='SUN':
print(7)
exit()
elif youbi[i]==s:
print(6-i)
|
[
"call.add"
] | 652,302
| 652,303
|
u768256617
|
python
|
p02847
|
weekdays = ["", "SAT", "FRI", "THU", "WED","TUE","MON", "SUN"]
w = input()
print(weedays.index(w))
|
weekdays = ["", "SAT", "FRI", "THU", "WED","TUE","MON", "SUN"]
w = input()
print(weekdays.index(w))
|
[
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 652,304
| 652,305
|
u736729525
|
python
|
p02847
|
weekdays = ["", "SAT", "FRI", "THU", "WED","TUE","MON", "SUN"]
w = input()
print(weedays.find(w))
|
weekdays = ["", "SAT", "FRI", "THU", "WED","TUE","MON", "SUN"]
w = input()
print(weekdays.index(w))
|
[
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 652,306
| 652,305
|
u736729525
|
python
|
p02847
|
w = "SUN,MON,TUE,WED,THU,FRI,SAT".split(",")
S = input().strip()
for i, d in enumerate(w):
if d == S:
print(-i % 7)
|
w = "SUN,MON,TUE,WED,THU,FRI,SAT".split(",")
S = input().strip()
for i, d in enumerate(w):
if d == S:
print(7 - i)
|
[
"call.arguments.change",
"expression.operation.binary.remove"
] | 652,328
| 652,329
|
u176354582
|
python
|
p02847
|
x = input()
youbi = {
'SUN': 7
, 'MON': 6
, 'TUE': 5
, 'WED': 4
, 'THU': 3
, 'TRI': 2
, 'SAT': 1
}
print(youbi[x])
|
x = input()
youbi = {
'SUN': 7
, 'MON': 6
, 'TUE': 5
, 'WED': 4
, 'THU': 3
, 'FRI': 2
, 'SAT': 1
}
print(youbi[x])
|
[
"literal.string.change",
"assignment.value.change"
] | 652,340
| 652,341
|
u085530099
|
python
|
p02847
|
S = input()
DAY = ["SUN","MON","TUE","WED","THU","FRY","SAT"]
print(7-DAY.index(S))
|
S = input()
DAY = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-DAY.index(S))
|
[
"literal.string.change",
"assignment.value.change"
] | 652,357
| 652,358
|
u252071027
|
python
|
p02847
|
youbi = ['SUN','MON','TUE','WED','THU','FRI','SAT']
y = input()
for i in range(1, 7):
if y == youbi[i]:
print(7-i)
|
youbi = ['SUN','MON','TUE','WED','THU','FRI','SAT']
y = input()
for i in range(7):
if y == youbi[i]:
print(7-i)
|
[
"call.arguments.change"
] | 652,359
| 652,360
|
u162612857
|
python
|
p02847
|
a=input("")
if(a=="SUN"):
print(7)
elif(a=="MON"):
print(6)
elif(a=="TUE"):
print(5)
elif(a=="WEN"):
print(4)
elif(a=="THU"):
print(3)
elif(a=="FRI"):
print(2)
else:
print(1)
|
a=input("")
if(a=="SUN"):
print(7)
elif(a=="MON"):
print(6)
elif(a=="TUE"):
print(5)
elif(a=="WED"):
print(4)
elif(a=="THU"):
print(3)
elif(a=="FRI"):
print(2)
else:
print(1)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,362
| 652,363
|
u455408345
|
python
|
p02847
|
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(day[(day.index(input())+1)%7])
|
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
print((-day.index(input())-1)%7+1)
|
[
"expression.operation.unary.add",
"call.arguments.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,364
| 652,365
|
u556594202
|
python
|
p02847
|
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
s = input()
ans = 0
if s == "SUM":
ans = 7
elif s == "MON":
ans = 6
elif s == "TUE":
ans = 5
elif s == "WED":
ans = 4
elif s == "THU":
ans = 3
elif s == "FRI":
ans = 2
elif s == "SAT":
ans = 1
print (ans)
|
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
s = input()
ans = 0
if s == "SUN":
ans = 7
elif s == "MON":
ans = 6
elif s == "TUE":
ans = 5
elif s == "WED":
ans = 4
elif s == "THU":
ans = 3
elif s == "FRI":
ans = 2
elif s == "SAT":
ans = 1
print (ans)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,366
| 652,367
|
u330799501
|
python
|
p02847
|
s = input()
if s =="SAT":
print(1)
elif s== "FRI":
print(2)
elif s== "THE":
print(3)
elif s== "WED":
print(4)
elif s== "TUE":
print(5)
elif s== "MON":
print(6)
elif s== "SUN":
print(7)
|
s = input()
if s =="SAT":
print(1)
elif s== "FRI":
print(2)
elif s== "THU":
print(3)
elif s== "WED":
print(4)
elif s== "TUE":
print(5)
elif s== "MON":
print(6)
elif s== "SUN":
print(7)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,368
| 652,369
|
u550146922
|
python
|
p02847
|
daw = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
ind = daw.index(S)
print(7 - idx)
|
daw = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
idx = daw.index(S)
print(7 - idx)
|
[
"assignment.variable.change",
"identifier.change"
] | 652,376
| 652,377
|
u934442292
|
python
|
p02847
|
daw = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
ind = daw.find(S)
print(7 - idx)
|
daw = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
idx = daw.index(S)
print(7 - idx)
|
[
"assignment.variable.change",
"identifier.change",
"assignment.value.change"
] | 652,378
| 652,377
|
u934442292
|
python
|
p02847
|
s = input()
if s =='SUN':
print(7)
elif s == 'SAT':
print(1)
elif s == 'FRI':
print(2)
elif s == 'THU':
print(3)
elif s == 'WED':
print(4)
elif s == 'TUS':
print(5)
elif s == 'MON':
print(6)
|
s = input()
if s =='SUN':
print(7)
elif s == 'SAT':
print(1)
elif s == 'FRI':
print(2)
elif s == 'THU':
print(3)
elif s == 'WED':
print(4)
elif s == 'TUE':
print(5)
elif s == 'MON':
print(6)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,398
| 652,399
|
u569776981
|
python
|
p02847
|
s = input()
days = {
"SUN" : 0, "MON": 6, "TUE": 5, "WED": 4, "THU" : 3, "FRI" : 2, "SAT": 1
}
print(days[s])
|
s = input()
days = {
"SUN" : 7, "MON": 6, "TUE": 5, "WED": 4, "THU" : 3, "FRI" : 2, "SAT": 1
}
print(days[s])
|
[
"literal.number.integer.change",
"assignment.value.change"
] | 652,403
| 652,404
|
u349024904
|
python
|
p02847
|
wee=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print((7-wee.index(input()))%7)
|
wee=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print((7-wee.index(input())))
|
[
"expression.operation.binary.remove"
] | 652,407
| 652,408
|
u168416324
|
python
|
p02847
|
import sys
# input = sys.stdin.readline
def main():
S = input()
if S == "SUN":
print(7)
elif S == "MON":
print(6)
elif S =="TUE":
print(5)
elif S =="WEB":
print(4)
elif S =="THU":
print(3)
elif S =="FRI":
print(2)
else:
print(1)
if __name__ == "__main__":
main()
|
import sys
# input = sys.stdin.readline
def main():
S = input()
if S == "SUN":
print(7)
elif S == "MON":
print(6)
elif S =="TUE":
print(5)
elif S =="WED":
print(4)
elif S =="THU":
print(3)
elif S =="FRI":
print(2)
else:
print(1)
if __name__ == "__main__":
main()
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,417
| 652,418
|
u408071652
|
python
|
p02847
|
d='SUN,MON,TUE,WED,THU,FRI,SAT'.split(',')
s=input()
print(7 - d.find(s))
|
d='SUN,MON,TUE,WED,THU,FRI,SAT'.split(',')
s=input()
print(7 - d.index(s))
|
[
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,429
| 652,430
|
u926080943
|
python
|
p02847
|
print(sum(map(ord,input()))**698%6329%8)
|
print(-sum(map(ord,input()))**236%6133%8)
|
[
"expression.operation.unary.add",
"call.arguments.change",
"literal.number.integer.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,431
| 652,432
|
u729133443
|
python
|
p02847
|
print(sum(map(ord,input()))**698%6329%8)
|
print((sum(map(ord,input()))+9)**49%9133%8)
|
[
"call.arguments.change",
"literal.number.integer.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,431
| 652,434
|
u729133443
|
python
|
p02847
|
print(sum(map(ord,input()))**698%6329%8)
|
print(sum(map(ord,input()+'\n'))**698%6329%8)
|
[
"expression.operation.binary.add"
] | 652,431
| 652,435
|
u729133443
|
python
|
p02847
|
s = input()
if s == 'SAT':
print(1)
if s == 'FRY':
print(2)
if s == 'THU':
print(3)
if s == 'WED':
print(4)
if s == 'TUE':
print(5)
if s == 'MON':
print(6)
if s == 'SUN':
print(7)
|
s = input()
if s == 'SAT':
print(1)
if s == 'FRI':
print(2)
if s == 'THU':
print(3)
if s == 'WED':
print(4)
if s == 'TUE':
print(5)
if s == 'MON':
print(6)
if s == 'SUN':
print(7)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,436
| 652,437
|
u285265363
|
python
|
p02847
|
s=input()
if s=="SUN":
print(7)
elif s=="SAT":
print(1)
elif s=="FRI":
print(2)
elif s=="THU":
print(3)
elif s=="WED":
print(4)
elif s=="THE":
print(5)
elif s=="MON":
print(6)
|
s=input()
if s=="SUN":
print(7)
elif s=="SAT":
print(1)
elif s=="FRI":
print(2)
elif s=="THU":
print(3)
elif s=="WED":
print(4)
elif s=="TUE":
print(5)
elif s=="MON":
print(6)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,444
| 652,445
|
u954153335
|
python
|
p02847
|
s = input()
arr = ["SUN","Mon","TUE","WED","THU","FRI","SAT"]
for i in range(7):
if s==arr[i]:
print(7-i)
|
s = input()
arr = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(7):
if s==arr[i]:
print(7-i)
|
[
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 652,460
| 652,461
|
u911449886
|
python
|
p02847
|
days = ["SUN", 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
d = input()
print(days.index(d)+1)
|
days = ["SUN", 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
days.reverse()
d = input()
print(days.index(d)+1)
|
[
"call.add"
] | 652,462
| 652,463
|
u643679148
|
python
|
p02847
|
S=str(input())
if S=='SUN':
print(int(7-0))
elif S=='MON':
print(int(7-1))
elif S=='TUE':
print(int(7-2))
elif S=='WEN':
print(int(7-3))
elif S=='THU':
print(int(7-4))
elif S=='FRY':
print(int(7-5))
elif S=='SAT':
print(int(7-6))
|
S=str(input())
if S=='SUN':
print(int(7-0))
elif S=='MON':
print(int(7-1))
elif S=='TUE':
print(int(7-2))
elif S=='WED':
print(int(7-3))
elif S=='THU':
print(int(7-4))
elif S=='FRI':
print(int(7-5))
elif S=='SAT':
print(int(7-6))
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,464
| 652,465
|
u645281160
|
python
|
p02847
|
s=input()
a=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-a.index(a))
|
s=input()
a=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-a.index(s))
|
[
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,468
| 652,469
|
u886902015
|
python
|
p02847
|
s=input()
s.upper()
week=['sun','mon','tue','wed','thu','fri','sat']
ans=week.index(s)
print(7-ans)
|
s=input()
s=s.lower()
week=['sun','mon','tue','wed','thu','fri','sat']
ans=week.index(s)
print(7-int(ans))
|
[
"assignment.value.change",
"identifier.change",
"call.add",
"call.arguments.change"
] | 652,472
| 652,473
|
u710282484
|
python
|
p02847
|
S = input()
if S == "SUN" :
answer = 7
elif S == "MON" :
answer = 6
elif S == "THE" :
answer = 5
elif S == "WED" :
answer = 4
elif S == "THU" :
answer = 3
elif S == "FRI" :
answer = 2
elif S == "SAT" :
answer = 1
print(answer)
|
S = input()
if S == "SUN" :
answer = 7
elif S == "MON" :
answer = 6
elif S == "TUE" :
answer = 5
elif S == "WED" :
answer = 4
elif S == "THU" :
answer = 3
elif S == "FRI" :
answer = 2
elif S == "SAT" :
answer = 1
print(answer)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,476
| 652,477
|
u063346608
|
python
|
p02847
|
W = ["SUM", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
S = input()
print(len(W) - W.index(S))
|
W = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
S = input()
print(len(W) - W.index(S))
|
[
"literal.string.change",
"assignment.value.change"
] | 652,480
| 652,481
|
u263660661
|
python
|
p02847
|
# 次の日曜日が何日後か出力
answer = input ()
if answer == "SUN":
print("7")
elif answer == "MON":
print("6")
elif answer == "TUE":
print("5")
elif answer == "WED":
print("4")
elif answer == "THU":
print("3")
elif answer == "FRI":
print("2")
elif answer == "STU":
print("1")
|
# 次の日曜日が何日後か出力
answer = input ()
if answer == "SUN":
print("7")
elif answer == "MON":
print("6")
elif answer == "TUE":
print("5")
elif answer == "WED":
print("4")
elif answer == "THU":
print("3")
elif answer == "FRI":
print("2")
elif answer == "SAT":
print("1")
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,484
| 652,485
|
u512520932
|
python
|
p02847
|
#146A
#1.入力をちゃんと受け取ること
s=input()
#2.結果を出力する
if s=='SUN' :
print('7')
elif s=='MAN':
print('6')
elif s=='TUE':
print('5')
elif s=='WED':
print('4')
elif s=='THU':
print('3')
elif s=='FRI':
print('2')
elif s=='SAT':
print('1')
|
#146A
#1.入力をちゃんと受け取ること
s=input()
#2.結果を出力する
if s=='SUN' :
print('7')
elif s=='MON':
print('6')
elif s=='TUE':
print('5')
elif s=='WED':
print('4')
elif s=='THU':
print('3')
elif s=='FRI':
print('2')
elif s=='SAT':
print('1')
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,486
| 652,487
|
u681502232
|
python
|
p02847
|
S = input()
if S == 'SUN':
print('7')
elif S == 'MON':
print('6')
elif S == 'TUE':
print('5')
elif S == 'WED':
print('4')
elif S == 'TUR':
print('3')
elif S == 'FRI':
print('2')
elif S == 'SAT':
print('1')
else: print('Error')
|
S = input()
if S == 'SUN':
print('7')
elif S == 'MON':
print('6')
elif S == 'TUE':
print('5')
elif S == 'WED':
print('4')
elif S == 'THU':
print('3')
elif S == 'FRI':
print('2')
elif S == 'SAT':
print('1')
else:
print('Error')
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,490
| 652,489
|
u835068843
|
python
|
p02847
|
S = input ()
if S == '':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
elif S == 'SAT':
print(1)
|
S = input ()
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
elif S == 'SAT':
print(1)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,495
| 652,499
|
u888380104
|
python
|
p02847
|
# 今日の曜日を表す文字列 Sが与えられます。
# Sは SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。
# 次の日曜日 (あす以降) が何日後か求めてください。
# 標準入力から曜日(S)を取得する
input_weekday = input()
# 次の日曜日はあと何日後かを計算して出力する
resut = 0
if input_weekday == 'SUN':
result = 7
elif input_weekday == 'MON':
result = 6
elif input_weekday == 'TUE':
result = 5
elif input_weekday == 'WED':
resut = 4
elif input_weekday == 'THU':
result = 3
elif input_weekday == 'FRI':
resut = 2
elif input_weekday == 'SAT':
result = 1
print(result)
|
# 今日の曜日を表す文字列 Sが与えられます。
# Sは SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。
# 次の日曜日 (あす以降) が何日後か求めてください。
# 標準入力から曜日(S)を取得する
input_weekday = input()
# 次の日曜日はあと何日後かを計算して出力する
result = 0
if input_weekday == 'SUN':
result = 7
elif input_weekday == 'MON':
result = 6
elif input_weekday == 'TUE':
result = 5
elif input_weekday == 'WED':
result = 4
elif input_weekday == 'THU':
result = 3
elif input_weekday == 'FRI':
result = 2
elif input_weekday == 'SAT':
result = 1
print(result)
|
[
"assignment.variable.change",
"identifier.change"
] | 652,500
| 652,501
|
u098994567
|
python
|
p02847
|
S = input()
print(S)
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
else:
print(1)
|
S = input()
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
else:
print(1)
|
[
"call.remove"
] | 652,514
| 652,515
|
u223060578
|
python
|
p02847
|
S = 'SAT'
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
else:
print(1)
|
S = input()
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
else:
print(1)
|
[] | 652,516
| 652,515
|
u223060578
|
python
|
p02847
|
# 146a
# 今日の曜日を表す文字列 S が与えられます。
# S は SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。
# 次の日曜日 (あす以降) が何日後か求めてください。
# S に入力されたSUN,MON,TUE,WED,THU,FRI,SAT を返す
S = input()
# if文で入力に対応した答えを返す
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'THE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
elif S == 'SAT':
print(1)
|
# 146a
# 今日の曜日を表す文字列 S が与えられます。
# S は SUN,MON,TUE,WED,THU,F
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金
# 次の日曜日 (あす以降) が何日後か求めてください
# S に入力されたSUN,MON,TUE,WED,T
S = input()
# if文で入力に対応した答えを返す
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
elif S == 'SAT':
print(1)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,517
| 652,518
|
u003505857
|
python
|
p02847
|
# 146a
# 今日の曜日を表す文字列 S が与えられます。
# S は SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。
# 次の日曜日 (あす以降) が何日後か求めてください。
# S に入力されたSUN,MON,TUE,WED,THU,FRI,SAT を返す
S = input()
# if文で入力に対応した答えを返す
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'THU':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
elif S == 'SAT':
print(1)
|
# 146a
# 今日の曜日を表す文字列 S が与えられます。
# S は SUN,MON,TUE,WED,THU,F
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金
# 次の日曜日 (あす以降) が何日後か求めてください
# S に入力されたSUN,MON,TUE,WED,T
S = input()
# if文で入力に対応した答えを返す
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
elif S == 'SAT':
print(1)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,519
| 652,518
|
u003505857
|
python
|
p02847
|
S = input()
if S == ('SUN'):
print(7)
elif S == ('MON'):
print(6)
elif S == ('TUE'):
print(5)
elif S == ('WED'):
print(4)
elif S == ('THU'):
print(3)
elif S == ('FRY'):
print(2)
elif S == ('SAT'):
print(1)
else:
print('入力に誤りがあります。SUN,MON,TUE,WED,THU,FRI,SATのいずれかを入力してください。')
|
S = input()
if S == ('SUN'):
print(7)
elif S == ('MON'):
print(6)
elif S == ('TUE'):
print(5)
elif S == ('WED'):
print(4)
elif S == ('THU'):
print(3)
elif S == ('FRI'):
print(2)
elif S == ('SAT'):
print(1)
else:
print('入力に誤りがあります。SUN,MON,TUE,WED,THU,FRI,SATのいずれかを入力してください。')
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,520
| 652,521
|
u657096772
|
python
|
p02847
|
# 今日の曜日を表す文字列 S が与えられます。
# Sは SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。
# 次の日曜日 (あす以降) が何日後か求めてください。
# 入力: 入力は以下の形式で標準入力から与えられる。
# S
# 出力: 次の日曜日が何日後か出力せよ。
week = input()
if week == 'SAT':
result = 1
elif week == 'FRI':
result = 2
elif week == 'THU':
result = 3
elif week == 'WED':
result = 4
elif week == 'TUS':
result = 5
elif week == 'MON':
result = 6
elif week == 'SUN':
result = 7
print(result)
|
# 今日の曜日を表す文字列 S が与えられます。
# Sは SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。
# 次の日曜日 (あす以降) が何日後か求めてください。
# 入力: 入力は以下の形式で標準入力から与えられる。
# S
# 出力: 次の日曜日が何日後か出力せよ。
week = input()
if week == 'SAT':
result = 1
elif week == 'FRI':
result = 2
elif week == 'THU':
result = 3
elif week == 'WED':
result = 4
elif week == 'TUE':
result = 5
elif week == 'MON':
result = 6
elif week == 'SUN':
result = 7
print(result)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,522
| 652,523
|
u332331919
|
python
|
p02847
|
S = 'SUN'
if S == 'SUN':
print('7')
elif S == 'MON':
print('6')
elif S == 'TUE':
print('5')
elif S == 'WED':
print('4')
elif S == 'THU':
print('3')
elif S == 'FRI':
print('2')
elif S == 'SAT':
print('1')
else:
print('入力エラー')
|
S = input()
if S == 'SUN':
print('7')
elif S == 'MON':
print('6')
elif S == 'TUE':
print('5')
elif S == 'WED':
print('4')
elif S == 'THU':
print('3')
elif S == 'FRI':
print('2')
elif S == 'SAT':
print('1')
else:
print('入力エラー')
|
[] | 652,524
| 652,525
|
u454866339
|
python
|
p02847
|
#基準曜日の取得
S = input()
# 入力された内容をもとに次の日曜日までの日数を表示
if S == "SUT":
print(1)
elif S == "FRI":
print(2)
elif S == "THU":
print(3)
elif S == "WED":
print(4)
elif S == "TUE":
print(5)
elif S == "MON":
print(6)
elif S == "SUN":
print(7)
else:
print("入力内容が間違っています。")
|
#基準曜日の取得
S = input()
# 入力された内容をもとに次の日曜日までの日数を表示
if S == "SAT":
print(1)
elif S == "FRI":
print(2)
elif S == "THU":
print(3)
elif S == "WED":
print(4)
elif S == "TUE":
print(5)
elif S == "MON":
print(6)
elif S == "SUN":
print(7)
else:
print("入力内容が間違っています。")
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,526
| 652,527
|
u278143034
|
python
|
p02847
|
S = input()
if S == 'SUN':
print('7')
if S == 'MOM':
print('6')
if S == 'TUE':
print('5')
if S == 'WED':
print('4')
if S == 'THU':
print('3')
if S == 'FRI':
print('2')
if S == 'SAT':
print('1')
|
S = input()
if S == 'SUN':
print('7')
if S == 'MON':
print('6')
if S == 'TUE':
print('5')
if S == 'WED':
print('4')
if S == 'THU':
print('3')
if S == 'FRI':
print('2')
if S == 'SAT':
print('1')
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,528
| 652,529
|
u663437630
|
python
|
p02847
|
s=input()
dict1={7:'SUN',6:'MON',5:'TUE',4:'WED',3:'THU',2:'FRI',1:'SAT'}
keys = [k for k, v in dict1.items() if v == s]
print(keys)
|
s=input()
dict1={7:'SUN',6:'MON',5:'TUE',4:'WED',3:'THU',2:'FRI',1:'SAT'}
keys = [k for k, v in dict1.items() if v == s]
print(keys[0])
|
[] | 652,539
| 652,540
|
u888933875
|
python
|
p02847
|
S = input()
d = {"SUN": 7, "MON":6, "TUE":5, "WED":4, "THR":3, "FRI":2, "SAT":1}
print(d[S])
|
S = input()
d = {"SUN": 7, "MON":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1}
print(d[S])
|
[
"literal.string.change",
"assignment.value.change"
] | 652,552
| 652,553
|
u871841829
|
python
|
p02847
|
S = input()
d = {"SUN": 7, "MON":6, "TUE":5, "WED":4, "THR":3, "FRI":2, "SAT":1}
print(d[S])
|
S = input()
d = {"SUN": 7, "MON":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1}
print(d[S])
|
[
"literal.string.change",
"assignment.value.change"
] | 652,554
| 652,553
|
u871841829
|
python
|
p02847
|
S = input()
week = ["SUN","MOM","TUE","WED","THU","FRI","SAT"]
print(len(week)-week.index(S))
|
S = input()
week = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(len(week)-week.index(S))
|
[
"literal.string.change",
"assignment.value.change"
] | 652,560
| 652,561
|
u561083515
|
python
|
p02847
|
t="SUN,MON,TUE,WED,THU,FRI,SAT"
s=t.split(",")
print((7-s.index(input()))%7)
|
t="SUN,MON,TUE,WED,THU,FRI,SAT"
s=t.split(",")
print((7-s.index(input())))
|
[
"expression.operation.binary.remove"
] | 652,562
| 652,563
|
u227082700
|
python
|
p02847
|
s=input()
t=["SUN","MON","TUE","WED","THU","FRI","SAT"][::-1]
i=t.index(s)
print(6-i)
|
s=input()
t=["SUN","MON","TUE","WED","THU","FRI","SAT"]
i=t.index(s)
print(7-i)
|
[
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 652,564
| 652,565
|
u227082700
|
python
|
p02847
|
S = int(input())
if S == "SUN":
print(7)
elif S == "MON":
print(6)
elif S == "TUE":
print(5)
elif S == "WED":
print(4)
elif S == "THU":
print(3)
elif S == "FRI":
print(2)
else:
print(1)
|
S = str(input())
if S == "SUN":
print(7)
elif S == "MON":
print(6)
elif S == "TUE":
print(5)
elif S == "WED":
print(4)
elif S == "THU":
print(3)
elif S == "FRI":
print(2)
else:
print(1)
|
[
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 652,570
| 652,571
|
u961945062
|
python
|
p02847
|
day=['SUN','MON','TUE','WED','THU','FRY','SAT']
print(7-day.index(input()))
|
day=['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-day.index(input()))
|
[
"literal.string.change",
"assignment.value.change"
] | 652,573
| 652,574
|
u040053163
|
python
|
p02847
|
s=input()
week=['SAT','FRI','THU','WED','TUE','MON','SUN']
for i in range(1,7):
if s==week[i]:
print(i)
|
s=input()
week=['SAT','FRI','THU','WED','TUE','MON','SUN']
for i in range(7):
if s==week[i]:
print(i+1)
|
[
"call.arguments.change"
] | 652,579
| 652,580
|
u057964173
|
python
|
p02847
|
day = input()
if day == "SUN":
print(7)
elif day == "MUN":
print(6)
elif day == "TUE":
print(5)
elif day == "WED":
print(4)
elif day == "THU":
print(3)
elif day == "FRI":
print(2)
elif day == "SAT":
print(1)
|
day = input()
if day == "SUN":
print(7)
elif day == "MON":
print(6)
elif day == "TUE":
print(5)
elif day == "WED":
print(4)
elif day == "THU":
print(3)
elif day == "FRI":
print(2)
elif day == "SAT":
print(1)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,597
| 652,598
|
u873839198
|
python
|
p02847
|
S=input()
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THS':
print(3)
elif S == 'FRI':
print(2)
elif S == 'SAT':
print(1)
|
S=input()
if S == 'SUN':
print(7)
elif S == 'MON':
print(6)
elif S == 'TUE':
print(5)
elif S == 'WED':
print(4)
elif S == 'THU':
print(3)
elif S == 'FRI':
print(2)
elif S == 'SAT':
print(1)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,613
| 652,614
|
u832871520
|
python
|
p02847
|
S=str(input())
L=['SUN','MON','TUE','WED','THU','FRI','SAT']
s=L.index(L)
print(7-s)
|
S=str(input())
L=['SUN','MON','TUE','WED','THU','FRI','SAT']
s=L.index(S)
print(7-s)
|
[
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 652,617
| 652,618
|
u523545435
|
python
|
p02847
|
s=input()
if s=='SUN':
print(7)
if s=='MON':
print(6)
if s=='TUE':
print(5)
if s=='WED':
print(4)
if s=='THU':
print(3)
if s=='FRI':
print(2)
else:
print(1)
|
s=input()
if s=='SUN':
print(7)
if s=='MON':
print(6)
if s=='TUE':
print(5)
if s=='WED':
print(4)
if s=='THU':
print(3)
if s=='FRI':
print(2)
if s=='SAT':
print(1)
|
[
"control_flow.branch.if.condition.change"
] | 652,621
| 652,622
|
u133356863
|
python
|
p02847
|
s = input()
d = {"SUN":0,"MO":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(d[s])
|
s = input()
d = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(d[s])
|
[
"literal.number.integer.change",
"assignment.value.change",
"literal.string.change"
] | 652,627
| 652,628
|
u102242691
|
python
|
p02847
|
s=input()
if s == 'SUN':
print(0)
elif s == 'MON':
print(6)
elif s == 'TUE':
print(5)
elif s == 'WED':
print(4)
elif s == 'THU':
print(3)
elif s == 'FRI':
print(2)
elif s == 'SAT':
print(1)
|
s=input()
if s == 'SUN':
print(7)
elif s == 'MON':
print(6)
elif s == 'TUE':
print(5)
elif s == 'WED':
print(4)
elif s == 'THU':
print(3)
elif s == 'FRI':
print(2)
elif s == 'SAT':
print(1)
|
[
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 652,629
| 652,630
|
u585348179
|
python
|
p02847
|
s = input()
if s == "MON":
print(6)
elif s == "TUE":
print(5)
elif s == "WED":
print(4)
elif s == "THU":
print(3)
elif s == "FRI":
print(2)
elif s == "SAT":
print(1)
else:
print(0)
|
s = input()
if s == "MON":
print(6)
elif s == "TUE":
print(5)
elif s == "WED":
print(4)
elif s == "THU":
print(3)
elif s == "FRI":
print(2)
elif s == "SAT":
print(1)
else:
print(7)
|
[
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 652,635
| 652,636
|
u084320347
|
python
|
p02847
|
days = [' ', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
s = input()
if s == 'SUM':
print(7)
exit()
print(7-days.index(s))
|
days = [' ', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
s = input()
if s == 'SUN':
print(7)
exit()
print(7-days.index(s))
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,639
| 652,640
|
u517621096
|
python
|
p02847
|
S_list = ['SUN', 'MON','TUE','WED','THU','FRI','SAT']
S = input()
print(S_list)
for i, s in enumerate(S_list):
if S == s:
print(7-i)
|
S_list = ['SUN', 'MON','TUE','WED','THU','FRI','SAT']
S = input()
for i, s in enumerate(S_list):
if S == s:
print(7-i)
|
[
"call.remove"
] | 652,641
| 652,642
|
u331226975
|
python
|
p02847
|
s=input()
if s=="SAT":
print(1)
if s=="SUN":
print(7)
if s=="MON":
print(6)
if s=="TUE":
print(5)
if s=="WED":
print(4)
if s=="THU":
print(3)
if s=="FRY":
print(2)
|
s=input()
if s=="SAT":
print(1)
if s=="SUN":
print(7)
if s=="MON":
print(6)
if s=="TUE":
print(5)
if s=="WED":
print(4)
if s=="THU":
print(3)
if s=="FRI":
print(2)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,643
| 652,644
|
u239653493
|
python
|
p02847
|
from sys import stdin
S = stdin.readline().rstrip()
days = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
if S == "SUN":
print(6)
else:
i = days.index(S)
print(6 - i)
|
from sys import stdin
S = stdin.readline().rstrip()
days = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
if S == "SUN":
print(7)
else:
i = days.index(S)
print(6 - i)
|
[
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 652,655
| 652,656
|
u868981240
|
python
|
p02847
|
from sys import stdin
S = stdin.readline().rstrip()
days = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
if S == "SUN":
print(days[6])
else:
i = days.index(S)
print(6-i)
|
from sys import stdin
S = stdin.readline().rstrip()
days = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
if S == "SUN":
print(7)
else:
i = days.index(S)
print(6 - i)
|
[
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"io.output.change"
] | 652,657
| 652,656
|
u868981240
|
python
|
p02847
|
week = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7 - index(input()))
|
week = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7 - week.index(input()))
|
[] | 652,664
| 652,665
|
u067694718
|
python
|
p02847
|
S = input()
week = ["SUN", "MAN", "TUE", "WED", "THU", "FRI", "SAT"]
print(7-week.index(S))
|
S = input()
week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7-week.index(S))
|
[
"literal.string.change",
"assignment.value.change"
] | 652,683
| 652,684
|
u600261652
|
python
|
p02847
|
s = input()
if s=="SAT":
ans=1
if s=="FRI":
ans=2
if s=="THU":
ans=3
if s=="WED":
ans=4
if s=="THU":
ans=5
if s=="MON":
ans=6
if s=="SUN":
ans=7
print(ans)
|
s = input()
if s=="SAT":
ans=1
if s=="FRI":
ans=2
if s=="THU":
ans=3
if s=="WED":
ans=4
if s=="TUE":
ans=5
if s=="MON":
ans=6
if s=="SUN":
ans=7
print(ans)
|
[
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 652,687
| 652,688
|
u682191329
|
python
|
p02847
|
a = input()
if a == "TUE":
print(5)
elif a == "WED":
print(4)
elif a == "THU":
print(3)
elif a == "FRI":
print(2)
elif a == "SAT":
print(1)
elif a == "SUN":
print(0)
else:
print(6)
|
a = input()
if a == "TUE":
print(5)
elif a == "WED":
print(4)
elif a == "THU":
print(3)
elif a == "FRI":
print(2)
elif a == "SAT":
print(1)
elif a == "SUN":
print(7)
else:
print(6)
|
[
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 652,691
| 652,692
|
u683956577
|
python
|
p02847
|
s = input()
week=["SUN","MON","TUE","WED","TUE","FRI","SAT"]
for d in week:
if d==s:
print(7-week.index(d))
|
s = input()
week=["SUN","MON","TUE","WED","THU","FRI","SAT"]
for d in week:
if d==s:
print(7-week.index(d))
|
[
"literal.string.change",
"assignment.value.change"
] | 652,693
| 652,694
|
u572343785
|
python
|
p02847
|
s = input()
if s == 'SUN':
print(0)
elif s == 'MON':
print(6)
elif s == 'TUE':
print(5)
elif s == 'WED':
print(4)
elif s == 'THU':
print(3)
elif s == 'FRI':
print(2)
elif s == 'SAT':
print(1)
|
s = input()
if s == 'SUN':
print(7)
elif s == 'MON':
print(6)
elif s == 'TUE':
print(5)
elif s == 'WED':
print(4)
elif s == 'THU':
print(3)
elif s == 'FRI':
print(2)
elif s == 'SAT':
print(1)
|
[
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 652,695
| 652,696
|
u251075661
|
python
|
p02847
|
import sys
a=str(input())
if a=="SUN":
print(0)
elif a=="MON":
print(6)
elif a=="TUE":
print(5)
elif a=="WED":
print(4)
elif a=="THU":
print(3)
elif a=="FRI":
print(2)
else :
print(1)
|
import sys
a=str(input())
if a=="SUN":
print(7)
elif a=="MON":
print(6)
elif a=="TUE":
print(5)
elif a=="WED":
print(4)
elif a=="THU":
print(3)
elif a=="FRI":
print(2)
else :
print(1)
|
[
"literal.number.integer.change",
"call.arguments.change",
"io.output.change"
] | 652,697
| 652,698
|
u791146764
|
python
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.