ZhenlongDai/ACPR huggingface dataset:
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
list = [input() for i in range(N)]

print("AC ×", list.count("AC"))
print("WA ×", list.count("WA"))
print("TLE ×", list.count("TLE"))
print("RE ×", list.count("RE"))


Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC × 3
WA × 1
TLE × 2
RE × 0


Fixed submission (verdict: Accepted):
N = int(input())
list = [input() for i in range(N)]

print("AC x", list.count("AC"))
print("WA x", list.count("WA"))
print("TLE x", list.count("TLE"))
print("RE x", list.count("RE"))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
s = [input() for i in range(N)]

res = {
    'AC' : 0,
    'TLE' : 0,
    'WA' : 0,
    'RE' : 0
}

for k in s:
    res[k] = res[k] + 1

for k, v in res.items():
    print(k + ' x ' + str(v))


Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC x 10
TLE x 0
WA x 0
RE x 0


Fixed submission (verdict: Accepted):
N = int(input())
s = [input() for i in range(N)]

res = {
    'AC' : 0,
    'WA' : 0,
    'TLE' : 0,
    'RE' : 0
}

for k in s:
    res[k] = res[k] + 1

for k, v in res.items():
    print(k + ' x ' + str(v))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):








N = int(input())
S = [0]*N
for i in range(N):
    S[i] = input()


C = [0]*4
rslt = ['AC', 'WA', 'TLE', 'RE']
for i in range(4):
    C[i] = S.count(rslt[i])


for i in range(4):
    print(rslt[i]+' '+'×'+' '+str(C[i]))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):








N = int(input())
S = [0]*N
for i in range(N):
    S[i] = input()


C = [0]*4
rslt = ['AC', 'WA', 'TLE', 'RE']
for i in range(4):
    C[i] = S.count(rslt[i])


for i in range(4):
    print(rslt[i]+' '+'x'+' '+str(C[i]))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a=0
w=0
t=0
r=0

for i in range(n):
    ans = input()

    if ans == 'AC':
        a+=1
    elif ans == 'WA':
        w+=1
    elif ans == 'TLE':
        t+=1
    else:
        r+=1

print("AC x" + str(a))
print("WA x" + str(w))
print("TLE x" + str(t))
print("RE x" + str(r))



Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC x3
WA x1
TLE x2
RE x0


Fixed submission (verdict: Accepted):
n = int(input())
a=0
w=0
t=0
r=0

for i in range(n):
    ans = input()

    if ans == 'AC':
        a+=1
    elif ans == 'WA':
        w+=1
    elif ans == 'TLE':
        t+=1
    else:
        r+=1

print("AC x"+" "+str(a))
print("WA x"+" "+str(w))
print("TLE x"+" "+str(t))
print("RE x"+" "+str(r))
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
S=[input() for i in range(N)]
ac_count=0
wa_count=0
tle_count=0
re_count=0
for i in range(len(S)):
    if S[i]=="AC":
        ac_count+=1
    if S[i]=="WA":
        wa_count+=1
    if S[i]=="TLE":
        tle_count+=1
    if S[i]=="RE":
        re_count+=1
print("AC ×",ac_count)
print("WA ×",wa_count)
print("TLE ×",tle_count)
print("RE ×",re_count)

Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC × 3
WA × 1
TLE × 2
RE × 0


Fixed submission (verdict: Accepted):
N=int(input())
S=[input() for i in range(N)]
ac_count=0
wa_count=0
tle_count=0
re_count=0
for i in range(len(S)):
    if S[i]=="AC":
        ac_count+=1
    if S[i]=="WA":
        wa_count+=1
    if S[i]=="TLE":
        tle_count+=1
    if S[i]=="RE":
        re_count+=1
print("AC x",ac_count)
print("WA x",wa_count)
print("TLE x",tle_count)
print("RE x",re_count)

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    import collections
    n = int(input())
    if n>=1 and n<=10**5:
        mylist = []
        for i in range(1, n+1):
            s = input()
            mylist.append(s)
        c = collections.Counter(mylist)
        print('AC × ' + str(c['AC']))
        print('WA × ' + str(c['WA']))
        print('TLE × ' + str(c['TLE']))
        print('RE × ' + str(c['RE']))
if __name__ == "__main__":
    main()

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
def main():
    import collections
    n = int(input())
    mylist = []
    for i in range(n):
        s = input()
        mylist.append(s)
    c = collections.Counter(mylist)
    print('AC x ' + str(c['AC']))
    print('WA x ' + str(c['WA']))
    print('TLE x ' + str(c['TLE']))
    print('RE x ' + str(c['RE']))
if __name__ == "__main__":
    main()

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()

ac = a.count('AC')
wa = a.count('WA')
tle = a.count('TLE')
re = a.count('RE')

print('AC  ×  '+ str(ac))
print('WA  ×  '+ str(wa))
print('CLE  ×  '+ str(tle))
print('RE  ×  '+ str(re))

Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC  ×  0
WA  ×  0
CLE  ×  0
RE  ×  0


Fixed submission (verdict: Accepted):
N = int(input())
a = [input() for i in range(N)]
ac = a.count('AC')
wa = a.count('WA')
tle = a.count('TLE')
re = a.count('RE')


print('AC x '+ str(ac))
print('WA x '+ str(wa))
print('TLE x '+ str(tle))
print('RE x '+ str(re))
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
    
from collections import Counter

n = int(input())

l = [input() for _ in range(n)]

c = Counter(l)

for i in ['AC','WA','TLE','RE']:
    print(f'{i} × {c[i]}')




Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
from collections import Counter

n = int(input())

l = [input() for _ in range(n)]

c = Counter(l)

for i in ['AC','WA','TLE','RE']:
    print(f'{i} x {c[i]}')

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
jud = [0,0,0,0]
for i in range(N):
  s = str(input())
  if(s == "AC"):
    jud[0]+=1
  elif(s == "WA"):
    jud[1] += 1
  elif(s == "TLE"):
    jud[2]+=1
  else:
    jud[3]+=1
print("AC x" +str(jud[0]))
print("WA x" +str(jud[1]))
print("TLE x" +str(jud[2]))
print("RE x" + str(jud[3]))
  

Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC x3
WA x1
TLE x2
RE x0


Fixed submission (verdict: Accepted):
N = int(input())
jud = [0,0,0,0]
for i in range(N):
  s = str(input())
  if(s == "AC"):
    jud[0]+=1
  elif(s == "WA"):
    jud[1] += 1
  elif(s == "TLE"):
    jud[2]+=1
  else:
    jud[3]+=1
print("AC x " +str(jud[0]))
print("WA x " +str(jud[1]))
print("TLE x " +str(jud[2]))
print("RE x " + str(jud[3]))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())

ac=0
wa=0
tle=0
re=0

for i in range(N):
  S=input()
  if S=='AC':
    ac+=1
  if S=='WA':
    wa+=1
  if S=='TLE':
    tle+=1
  if S=='RE':
    re+=1
  

print('AC ×',ac)
print('WA ×',wa)
print('TLE ×',tle)
print('RE ×',re)

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
N=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(N):
  S=input()
  if S=='AC':
    ac+=1
  if S=='WA':
    wa+=1
  if S=='TLE':
    tle+=1
  if S=='RE':
    re+=1


print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(ac,wa,tle,re))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = [0]*N
AC = 0
WA = 0
TLE = 0
RE = 0

for n in range(N):
  S[n] = input()
  if S[n] == "AC":
    AC += AC
  elif S[n] == "WA":
    WA += WA
  elif S[n] == "TLE":
    TLE += TLE
  elif S[n] == "RE":
    RE += RE
    
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(AC,WA,TLE,RE))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC x 0
WA x 0
TLE x 0
RE x 0


Fixed submission (verdict: Accepted):
N = int(input())
S = [0]*N
AC = 0
WA = 0
TLE = 0
RE = 0

for n in range(N):
  S[n] = str(input())
  if S[n] == "AC":
    AC = AC + 1
  elif S[n] == "WA":
    WA = WA + 1
  elif S[n] == "TLE":
    TLE = TLE + 1
  elif S[n] == "RE":
    RE = RE + 1
    
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(AC,WA,TLE,RE))
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
list = []
for i in range(N):
    list.append(input())
C0 = 0
C1 = 0
C2 = 0
C3 = 0
for i in range(N):
    if list[i] == "AC":
        C0 += 1
    elif list[i] == "WA":
        C1 += 1
    elif list[i] == "TLE":
        C2 += 1
    elif list[i] == "RE":
        C3 += 1
        
print("AC ×",C0)
print("WA ×", C1)
print("TLE ×", C2)
print("RE ×", C3)

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
N = int(input())
list = []
for i in range(N):
    list.append(input())
C0 = 0
C1 = 0
C2 = 0
C3 = 0
for i in range(N):
    if list[i] == "AC":
        C0 += 1
    elif list[i] == "WA":
        C1 += 1
    elif list[i] == "TLE":
        C2 += 1
    elif list[i] == "RE":
        C3 += 1
        
print("AC x",C0)
print("WA x", C1)
print("TLE x", C2)
print("RE x", C3)

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
ac,wa,tl,re=0,0,0,0
for i in range(n):
  s=input()
  if(s=="AC"):
    ac+=1
  if(s=="WA"):
    wa+=1
  if(s=="TLE"):
    tl+=1
  else:
    re+=1
print("AC",'x',ac)
print("WA",'x',wa)
print("TLE",'x',tl)
print("RE",'x',re)
   

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC x 10
WA x 0
TLE x 0
RE x 10


Fixed submission (verdict: Accepted):
n=int(input())
ac,wa,tl,re=0,0,0,0
for i in range(n):
  s=input()
  if(s=="AC"):
    ac+=1
  elif(s=="WA"):
    wa+=1
  elif(s=="TLE"):
    tl+=1
  else:
    re+=1
print("AC",'x',ac)
print("WA",'x',wa)
print("TLE",'x',tl)
print("RE",'x',re)

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

s = []
for _ in range(n):
  s1 = input()
  s.append(s1)

print('AC × ' + str(s.count('AC')))
print('WA × ' + str(s.count('WA')))
print('TLE × ' + str(s.count('TLE')))
print('RE × ' + str(s.count('RE')))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
n = int(input())

s = []
for _ in range(n):
  s1 = input()
  s.append(s1)

print('AC x ' + str(s.count('AC')))
print('WA x ' + str(s.count('WA')))
print('TLE x ' + str(s.count('TLE')))
print('RE x ' + str(s.count('RE')))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

L = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(n):
    s = input()
    L[s] += 1
for i in L:
    print('{} × {}'.format(i, L[i]))

Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC × 3
WA × 1
TLE × 2
RE × 0


Fixed submission (verdict: Accepted):
n = int(input())

L = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(n):
    s = input()
    L[s] += 1

for l in L.keys():
    print(l, 'x', L[l])
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
Sn = [input()for i in range(n)]
C0 = Sn.count('AC')
C1 = Sn.count('WA')
C2 = Sn.count('TLE')
C3 = Sn.count('RE')

print('AC × '+str(C0))
print('WA × '+str(C1))
print('TLE × '+str(C2))
print('RE × '+str(C3))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
n = int(input())
Sn = [input()for i in range(1,n+1)]

C0 = Sn.count('AC')
C1 = Sn.count('WA')
C2 = Sn.count('TLE')
C3 = Sn.count('RE')

print('AC x '+str(C0))
print('WA x '+str(C1))
print('TLE x '+str(C2))
print('RE x '+str(C3))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

import collections
d=collections.defaultdict(lambda:0)
for _ in range(int(input())):
    s=input()
    d[s]+=1
print("AC X",d['AC'])
print("WA X",d['WA'])
print("TLE X",d["TLE"])
print("RE X",d['RE'])


Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC X 10
WA X 0
TLE X 0
RE X 0


Fixed submission (verdict: Accepted):

import collections
d=collections.defaultdict(lambda:0)
for _ in range(int(input())):
    s=input()
    d[s]+=1
print("AC x",d['AC'])
print("WA x",d['WA'])
print("TLE x",d["TLE"])
print("RE x",d['RE'])

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
n_apperances = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    s = input()
    n_apperances[s] += 1

for key in n_apperances:
    print('{} × {}'.format(key, n_apperances[key]))


Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC × 3
WA × 1
TLE × 2
RE × 0


Fixed submission (verdict: Accepted):
n = int(input())
n_apperances = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    s = input()
    n_apperances[s] += 1

for key in n_apperances:
    print('{} x {}'.format(key, n_apperances[key]))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())

countAC=0
countWA=0
countTLE=0
countRE=0

for i in range(n):
    s=input()
    if s=="AC":
        countAC += 1
    elif s=="WA":
        countWA += 1
    elif s=="TLE":
        countTLE += 1
    else:
        countRE += 1

print("AC × " + str(countAC))
print("WA × " + str(countWA))
print("TLE × " + str(countTLE))
print("RE × " + str(countRE))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
n=int(input())

countAC=0
countWA=0
countTLE=0
countRE=0

for i in range(n):
    s=input()
    if s=="AC":
        countAC += 1
    elif s=="WA":
        countWA += 1
    elif s=="TLE":
        countTLE += 1
    else:
        countRE += 1

print("AC x " + str(countAC))
print("WA x " + str(countWA))
print("TLE x " + str(countTLE))
print("RE x " + str(countRE))
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = []
word_list = ["AC","WA","TLE","RE"]
for i in range(N):                     
    array = input()
    S.append(array)

for i in range(4):
  print(word_list[i] +"×"+str(S.count(word_list[i])))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC×10
WA×0
TLE×0
RE×0


Fixed submission (verdict: Accepted):
N = int(input())
S = []
word_list = ["AC","WA","TLE","RE"]
for i in range(N):                     
    array = input()
    S.append(array)

for i in range(4):
  print(word_list[i] +" x "+str(S.count(word_list[i])))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

n=int(input())

s = [input() for i in range(n)]

print("AC *",s.count('AC'))
print("WA *",s.count('WA'))
print("TLE *",s.count('TLE'))
print("RE  *",s.count('RE'))

                                      

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC * 10
WA * 0
TLE * 0
RE  * 0


Fixed submission (verdict: Accepted):
n=int(input())

s = [input() for i in range(n)]

print("AC x",s.count('AC'))
print("WA x",s.count('WA'))
print("TLE x",s.count('TLE'))
print("RE x",s.count('RE'))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
  
inputList = []
countAC=0
countWA=0
countTLE=0
countRE=0
for i in range(0,N):
        val = input()

        if val=="AC":
                countAC=countAC+1
        elif val=="WA":
                countWA=countWA+1
        elif val=="TLE":
                countTLE=countTLE+1
        elif val=="RE":
                countRE=countRE+1
print("AC × "+str(countAC))
print("WA × "+str(countWA))
print("TLE × "+str(countTLE))
print("RE × "+str(countRE))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
N = int(input())
  
countAC=0
countWA=0
countTLE=0
countRE=0
for i in range(0,N):
        val = input()
        if val=="AC":
                countAC=countAC+1
        elif val=="WA":
                countWA=countWA+1
        elif val=="TLE":
                countTLE=countTLE+1
        elif val=="RE":
                countRE=countRE+1
        else:
                break
print("AC x "+str(countAC))
print("WA x "+str(countWA))
print("TLE x "+str(countTLE))
print("RE x "+str(countRE))
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(n):
    s = input()
    if s == "AC":
        c0 += 1
    elif s == "WA":
        c1 += 1
    elif s == "TLE":
        c2 += 1
    else:
        c3 += 1

print("AC x", c0)
print("WA x", c1)
print("TLE x", c2)
print("RTE x", c3)


Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC x 3
WA x 1
TLE x 2
RTE x 0


Fixed submission (verdict: Accepted):
n = int(input())

c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(n):
    s = input()
    if s == "AC":
        c0 += 1
    elif s == "WA":
        c1 += 1
    elif s == "TLE":
        c2 += 1
    else:
        c3 += 1

print("AC x", c0)
print("WA x", c1)
print("TLE x", c2)
print("RE x", c3)

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

l = []
for i in range(N):
    text = input()
    l.append(text)

print("AC" + " x " + str(l.count("AC")))
print("AC" + " x " + str(l.count("WA")))
print("TLE" + " x " + str(l.count("TLE")))
print("RE" + " x " + str(l.count("RE")))

Failing test case input:
6
AC
TLE
AC
AC
WA
TLE

Expected output:
AC x 3
WA x 1
TLE x 2
RE x 0

Actual output:
AC x 3
AC x 1
TLE x 2
RE x 0


Fixed submission (verdict: Accepted):
N = int(input())

l = []
for i in range(N):
    text = input()
    l.append(text)

print("AC" + " x " + str(l.count("AC")))
print("WA" + " x " + str(l.count("WA")))
print("TLE" + " x " + str(l.count("TLE")))
print("RE" + " x " + str(l.count("RE")))

Problem: p02613
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
ac = 0
wa = 0
tel = 0
re = 0
for y in range(0,n):
  x = input()
  if x[0] == 'A':
    ac += 1
  elif x[0] == 'W':
    wa += 1
  elif x[0] == 'T':
    tel += 1
  else:
    re += 1
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TEL x " + str(tel))
print("RE x " + str(re))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC x 10
WA x 0
TEL x 0
RE x 0


Fixed submission (verdict: Accepted):
n = int(input())
ac = 0
wa = 0
tel = 0
re = 0
for y in range(0,n):
  x = input()
  if x[0] == 'A':
    ac += 1
  elif x[0] == 'W':
    wa += 1
  elif x[0] == 'T':
    tel += 1
  else:
    re += 1
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tel))
print("RE x " + str(re))
Problem: p02613
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
dic=dict()
n=int(input())
for i in range(n):
    s=input()
    if s in dic:
        dic[s]+=1
    else:
        dic[s]=1
if "AC" in dic:
    print("AC *",dic["AC"])
else:
    print("AC * 0")
if "WA" in dic:
    print("WA *",dic["WA"])
else:
    print("WA * 0")
if "TLE" in dic:
    print("TLE *",dic["TLE"])
else:
    print("TLE * 0")
if "RE" in dic:
    print("RE *",dic["RE"])
else:
    print("RE * 0")
               


Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC * 10
WA * 0
TLE * 0
RE * 0


Fixed submission (verdict: Accepted):
dic=dict()
n=int(input())
for i in range(n):
    s=input()
    if s in dic:
        dic[s]+=1
    else:
        dic[s]=1
if "AC" in dic:
    print("AC x",dic["AC"])
else:
    print("AC x 0")
if "WA" in dic:
    print("WA x",dic["WA"])
else:
    print("WA x 0")
if "TLE" in dic:
    print("TLE x",dic["TLE"])
else:
    print("TLE x 0")
if "RE" in dic:
    print("RE x",dic["RE"])
else:
    print("RE x 0")

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
s = [input() for i in range(N)]
a = s.count("AC")
b = s.count("WA")
c = s.count("TLE")
d = s.count("RE")
print("AC * {}".format(a))
print("WA * {}".format(b))
print("TLE * {}".format(c))
print("RE * {}".format(d))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC * 10
WA * 0
TLE * 0
RE * 0


Fixed submission (verdict: Accepted):
N = int(input())
s = [input() for i in range(N)]
a = s.count("AC")
b = s.count("WA")
c = s.count("TLE")
d = s.count("RE")
print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
S=[0]*(N+1)
T=[0]*4
for i in range(N):
    S[i]=input()
for i in range(N):
    if S[i]=="AC":
        T[0]+=1
    elif S[i]=="WA":
        T[1]+=1
    elif S[i]=="TLE":
        T[2]+=1
    else:
        T[3]+=1
print("AC ×",T[0])
print("WA ×",T[1])
print("TLE ×",T[2])
print("RE ×",T[3])


Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
N=int(input())
S=[0]*(N+1)
T=[0]*4
for i in range(N):
    S[i]=input()
for i in range(N):
    if S[i]=="AC":
        T[0]+=1
    elif S[i]=="WA":
        T[1]+=1
    elif S[i]=="TLE":
        T[2]+=1
    else:
        T[3]+=1
print("AC x",T[0])
print("WA x",T[1])
print("TLE x",T[2])
print("RE x",T[3])
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())

C0=0
C1=0
C2=0
C3=0

for n in range(N):
    S=input()
    if S=="AC":
        C0+=1
    elif S=="WA":
        C1+=1
    elif S=="TLE":
        C2+=1
    else:
        C3+=1   

print("AC x"+str(C0))
print("WA x"+str(C1))
print("TLE x"+str(C2))
print("RE x"+str(C3))

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC x10
WA x0
TLE x0
RE x0


Fixed submission (verdict: Accepted):
N=int(input())

C0=0
C1=0
C2=0
C3=0

for n in range(N):
    S=input()
    if S=="AC":
        C0+=1
    elif S=="WA":
        C1+=1
    elif S=="TLE":
        C2+=1
    else:
        C3+=1   

print("AC x "+str(C0))
print("WA x "+str(C1))
print("TLE x "+str(C2))
print("RE x "+str(C3))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = int(input())
list1 = []
dict1 = {}
for x in range(a):
    b = input()
    list1.append(b)

for x in list1:
    if x not in dict1:
        dict1[x] = 1
    else:
        dict1[x] += 1

for x in dict1:
    print(f'{x} x {dict1[x]}')

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC x 10


Fixed submission (verdict: Accepted):
a = int(input())
list1 = []
dict1 = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0,}
for x in range(a):
    b = input()
    list1.append(b)

for x in list1:
    dict1[x] += 1

for x in dict1:
    print(f'{x} x {dict1[x]}')

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(n):
  s = input()
  if s == 'AC':
    c0 += 1
  elif s == 'WA':
    c1 += 1
  elif s == 'TLE':
    c2 += 1
  elif s == 'RE':
    c3 += 1
print('AC x', c0)
print('WA x', c1)
print('AC x', c2)
print('AC x', c3)

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC x 10
WA x 0
AC x 0
AC x 0


Fixed submission (verdict: Accepted):
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(n):
  s = input()
  if s == 'AC':
    c0 += 1
  elif s == 'WA':
    c1 += 1
  elif s == 'TLE':
    c2 += 1
  elif s == 'RE':
    c3 += 1
print('AC x', c0)
print('WA x', c1)
print('TLE x', c2)
print('RE x', c3)

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
l = []
for i in range(N):
    i = input()
    l.append(i)

b = l.count("AC")
c = l.count("WA")
d = l.count("TLE")
e = l.count("RE")

print("AC ×",b)
print("WA ×",c)
print("TLE ×",d)
print("RE ×",e)

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
N = int(input())
l = []
for i in range(N):
    i = input()
    l.append(i)

b = l.count("AC")
c = l.count("WA")
d = l.count("TLE")
e = l.count("RE")

print("AC x",b)
print("WA x",c)
print("TLE x",d)
print("RE x",e)
Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a=0
b=0
c=0
d=0
for i in range(n):
    s=input()
    a+=s.count('AC')
    b+=s.count('WA')
    c+=s.count('TLE')
    d+=s.count('RE')
print('AC × '+str(a))
print('WA × '+str(b))
print('TLE × '+str(c))
print('RE × '+str(d))


Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
AC × 10
WA × 0
TLE × 0
RE × 0


Fixed submission (verdict: Accepted):
n=int(input())
a=0
b=0
c=0
d=0
for i in range(n):
    s=input()
    a+=s.count('AC')
    b+=s.count('WA')
    c+=s.count('TLE')
    d+=s.count('RE')
print('AC x '+str(a))
print('WA x '+str(b))
print('TLE x '+str(c))
print('RE x '+str(d))

Problem: p02613
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
S = []
a = 0
t = 0
w = 0
r = 0
for _ in range(n):
    S.append(input())
for i in range(n):
  if S[i]=="AC":
    a += 1
  elif S[i]=="TLE":
    t += 1
  elif S[i]=="WA":
    w += 1
  else:
    r += 1
a = str(a)
w = str(w)
t = str(t)
r = str(r)
print("ACx"+a)
print("WAx"+w)
print("TLE"+t)
print("REx"+r)
    
    

Failing test case input:
10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Expected output:
AC x 10
WA x 0
TLE x 0
RE x 0

Actual output:
ACx10
WAx0
TLE0
REx0


Fixed submission (verdict: Accepted):
n = int(input())
S = []
a = 0
t = 0
w = 0
r = 0
for _ in range(n):
    S.append(input())
for i in range(n):
  if S[i]=="AC":
    a += 1
  elif S[i]=="TLE":
    t += 1
  elif S[i]=="WA":
    w += 1
  else:
    r += 1
a = str(a)
w = str(w)
t = str(t)
r = str(r)
print("AC x "+a)
print("WA x "+w)
print("TLE x "+t)
print("RE x "+r)
Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
import math


def main():
    A, B, C, D = [int(x) for x in stdin.readline().rstrip().split()]

    

    

    
    
    
    

    

    

    print(A, B, C, D)


if __name__ == "__main__":
    main()


Failing test case input:
5292456474884197 170847880819691070 33 70304397

Expected output:
160538591163293866


Actual output:
5292456474884197 170847880819691070 33 70304397


Fixed submission (verdict: Accepted):
from sys import stdin
import fractions


def main():
    A, B, C, D = [int(x) for x in stdin.readline().rstrip().split()]

    C_D = (C * D) 

    z = B

    if A % C == 0:
        x = (B
    else:
        x = (B

    y = B

    print((B-A+1)-(x+y-z))


if __name__ == "__main__":
    main()

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C, D = map(int, input().split())

A -= 1

A_C = A 
A_D = A 
A_Z = A 

A_num = A - ( A_C + A_D - A_Z )

B_C = B 
B_D = B 
B_Z = B 

B_num = B - ( B_C + B_D - B_Z )


print(B_num - A_num)



Failing test case input:
6354199306375155 38464981823067483 7 91372231

Expected output:
27523527570226360


Actual output:
0


Fixed submission (verdict: Accepted):
import fractions

A, B, C, D = map(int, input().split())

A -= 1

Z = ((C * D) 

A_C = A 
A_D = A 
A_Z = A 

A_num = A - (A_C + A_D - A_Z)

B_C = B 
B_D = B 
B_Z = B 


B_num = B - (B_C + B_D - B_Z)


print(B_num - A_num)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
A,B,C,D = map(int,input().split())
ans = 0
def gcd(a,b):
        while b!=0:
                a,b=b,a%b
        return a

def lcm(a,b):
        return a*b

def kosuu(x):
        global A,B
        return math.floor(B/x) - math.ceil(A/x) + 1

cn = kosuu(C)
dn = kosuu(D)
lc = lcm(C,D)
cdn = kosuu(lc)

print(B-A+1-(cn+dn-cdn))

Failing test case input:
2378114867615524 188107035759759287 38 70304397

Expected output:
180841315138509718


Actual output:
180841315138509717


Fixed submission (verdict: Accepted):
import math
A,B,C,D = map(int,input().split())
ans = 0
def gcd(a,b):
        while b!=0:
                a,b=b,a%b
        return a
 
def lcm(a,b):
        return a*b
 
def kosu(x):
        global C,D
        return x-(x

print(kosu(B)-kosu(A-1))
Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import math

def gcd(a, b):
  if b == 0:
    return a
  elif a > b:
    return gcd(b, a % b)
  else:
    return gcd(a, b % a)

def lcm(a, b):
  return (a * b) 


a,b,c,d = [int(x) for x in sys.stdin.readline().rstrip().split(" ")]
e = b - a + 1
f = int(b / c) - int((a - 1) / c)
g = int(b / d) - int((a - 1) / d)
cd = lcm(c, d)
h = int(b / cd) - int((a - 1) / cd)
n = e - f - g + h
print(n)


Failing test case input:
10 40 6 8

Expected output:
23

Actual output:
22


Fixed submission (verdict: Accepted):
import sys
import math

def gcd(a, b):
  if b == 0:
    return a
  else:
    return gcd(b, a % b)

def lcm(a, b):
  return (a * b) 

  
a,b,c,d = [int(x) for x in sys.stdin.readline().rstrip().split(" ")]
e = b - a + 1
if c == d:
  fgh = (b 
  n = e - fgh
  print(n) 
else:
  f = (b 
  g = (b 
  cd = lcm(c, d) 
  h = (b 
  n = e - f - g + h
  print(n)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def GCD(a,b):
  if a<b:
    tmp = a
    a = b
    b = tmp
 
  r = a % b
  while (r!=0): 
    a = b
    b = r
    r = a % b
  return b


A,B,C,D = map(int,input().split())
A = A - 1
upperC = int(B / C)
upperD = int(B / D)
lowerC = int(A / C)
lowerD = int(A / D)

numC = upperC - lowerC + 1
numD = upperD - lowerD + 1

gcd = GCD(C,D)

lcm = C * D / gcd
upperL = int(B / lcm)
lowerL = int(A / lcm)
numL = upperL - lowerL + 1

print(str(B - A + 1 - (numC + numD - numL)))

Failing test case input:
6097942338975935 38464981823067483 7 85843371

Expected output:
27743176377466217


Actual output:
27743176377466216


Fixed submission (verdict: Accepted):
def GCD(a,b):
  if a<b:
    tmp = a
    a = b
    b = tmp
 
  r = a % b
  while (r!=0): 
    a = b
    b = r
    r = a % b
  return b


A,B,C,D = map(int,input().split())
A = A - 1
upperC = int(B 
upperD = int(B 
lowerC = int(A 
lowerD = int(A 

numC = upperC - lowerC
numD = upperD - lowerD

gcd = GCD(C,D)

lcm = C * D 
upperL = int(B 
lowerL = int(A 
numL = upperL - lowerL

print(str(B - A - (numC + numD - numL)))

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,D = map(int,input().split())

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

CD = C * D 

tgC = int(B/C) - int((A-1)/C)
tgD = int(B/D) - int((A-1)/D)
tgCD = int(B/CD) - int((A-1)/CD)


print((B-A+1)-(tgC+tgD-tgCD))

Failing test case input:
2755958446070485 108249065682174014 32 109641300

Expected output:
102196446793080235


Actual output:
102196446702877191


Fixed submission (verdict: Accepted):
A,B,C,D = map(int,input().split())

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

CD = C * D 

tgC = max(B
tgD = max(B
tgCD = max(B

print((B-A+1)-(tgC+tgD-tgCD))
Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

a, b, c, d = map(int, input().split())

def gcd(a, b):
  while b:
    a, b = b, a%b
  return a

def count(a, c, d):
    tmp_a= a - math.floor(a/c) - math.floor(a/d)
    tmp_a += math.floor(a/math.floor(c*d/gcd(c, d)))
    return tmp_a

print(count(b,c,d)-count(a-1, c, d))

Failing test case input:
6354199306375155 38464981823067483 7 130965635

Expected output:
27523527661292171


Actual output:
27523527661292170


Fixed submission (verdict: Accepted):
import math
from decimal import Decimal

a, b, c, d = map(Decimal, input().split())

def gcd(a, b):
  while b:
    a, b = b, a%b
  return a

def count(a, c, d):
    tmp_a= a - math.floor(a/c) - math.floor(a/d)
    tmp_a += math.floor(a/((c*d)/gcd(c, d)))
    return tmp_a

print(int(count(b,c,d))-int(count(a-1, c, d)))

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

a, b, c, d = map(float, input().split())

def gcd(a, b):
  while b:
    a, b = b, a%b
  return a

def count(a, c, d):
    tmp_a= a - math.floor(a/c) - math.floor(a/d)
    tmp_a += math.floor(a/((c*d)/gcd(c, d)))
    return tmp_a

print(int(count(b,c,d))-int(count(a-1, c, d)))


Failing test case input:
6354199306375155 20832163180120607 9 91372231

Expected output:
12869301080262296


Actual output:
12869301080262298


Fixed submission (verdict: Accepted):
import math
from decimal import Decimal

a, b, c, d = map(Decimal, input().split())

def gcd(a, b):
  while b:
    a, b = b, a%b
  return a

def count(a, c, d):
    tmp_a= a - math.floor(a/c) - math.floor(a/d)
    tmp_a += math.floor(a/((c*d)/gcd(c, d)))
    return tmp_a

print(int(count(b,c,d))-int(count(a-1, c, d)))

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fractions

a, b, c, d = map(int, input().split())

lcm = c*d 


ans = b
ans = b-a - ans + 1

print(ans)

Failing test case input:
4799622382541550 38464981823067483 7 46883758

Expected output:
28856021762113509


Actual output:
-4799622382541549


Fixed submission (verdict: Accepted):
import fractions

a, b, c, d = map(int, input().split())

lcm = c*d 


b_num = b - (b
a_num = a-1 - (a-1)

ans = b_num - a_num
print(ans)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fractions

def lcm(x,y):
    return (x * y) 

A,B,C,D = [int(i) for i in input().split(" ")]
AB = B-A
BC = AB
BD = AB
CD = lcm(C,D)
BCD = AB
union = BC+BD-BCD
print(AB - union)

Failing test case input:
2755958446070485 108249065682174014 20 109641300

Expected output:
100218451874298354


Actual output:
0


Fixed submission (verdict: Accepted):
import fractions

def lcm(x,y):
    return (x * y) 
def wei(n,x,y):
    return n-(n

A,B,C,D = [int(i) for i in input().split(" ")]
print(wei(B,C,D) - wei(A-1,C,D))
Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math


def lcm(a, b):
    return a * b 


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


a, b, c, d = map(int, input().split())
ans = 0


cd = lcm(c, d)

cdiv = int(b / c) - int((a - 1) / c)
ddiv = int(b / d) - int((a - 1) / d)
cddiv = int(b / (cd)) - int((a - 1) / (cd))
ans = (b - a + 1) - (cdiv + ddiv-cddiv)

print(ans)


Failing test case input:
4799622382541550 38464981823067483 7 46883758

Expected output:
28856021762113509


Actual output:
28856021762113508


Fixed submission (verdict: Accepted):
import math


def lcm(a, b):
    return a * b 


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


a, b, c, d = map(int, input().split())
ans = 0


cd = lcm(c, d)

bdiv = (b 
adiv = ((a - 1) 
ans = (b - a) - (bdiv - adiv) + 1

print(ans)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
lis=list(map(int,input().split()))
A=lis[0]
B=lis[1]
C=lis[2]
D=lis[3]
sum=B-A+1
times=C*D
restac=A%C
restbc=B%C
restad=A%D
restbd=B%D
restat=A%times
restbt=B%times
x=int((B-restbc)/C)-int((A-restac)/C)
y=int((B-restbd)/D)-int((A-restad)/D)
z=int((B-restbt)/times)-int((A-restat)/times)
if restac==0:
  x+=1
if restad==0:
  y+=1
if(restat==0):
  z+=1
print(sum-x-y+z)

Failing test case input:
11519628362605307 5772277299890772 391 3058835041

Expected output:
-5732651953340016


Actual output:
-5732651953263129


Fixed submission (verdict: Accepted):
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a
lis=list(map(int,input().split()))
A=lis[0]
B=lis[1]
C=lis[2]
D=lis[3]
sum=B-A+1

times=C*D
restac=A%C
restbc=B%C
restad=A%D
restbd=B%D
restat=A%times
restbt=B%times
x=int((B-restbc)
y=int((B-restbd)
z=int((B-restbt)
if restac==0:
  x+=1
if restad==0:
  y+=1
if(restat==0):
  z+=1
print(sum-x-y+z)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = [int(i) for i in input().split()]
lower_limit = num[0]
upper_limit = num[1]
c = num[2]
d = num[3]

def count_multi(x):
  count = (upper_limit - lower_limit) 
  if upper_limit % x == 0 or lower_limit % x == 0:
    count += 1
  return count

multi_c_d = count_multi(c) + count_multi(d) - count_multi(c*d)
print(upper_limit - lower_limit + 1 - multi_c_d)


Failing test case input:
6354199306375155 17772256894214095 9 91372231

Expected output:
10149384411446162


Actual output:
0


Fixed submission (verdict: Accepted):
import fractions
num = [int(i) for i in input().split()]
lower_limit = num[0]
upper_limit = num[1]
c = num[2]
d = num[3]

def count_multi(x):
  count = upper_limit
  return count

cd_gcd = fractions.gcd(c, d)

multi_c_d = count_multi(c) + count_multi(d) - count_multi(c*d
print(upper_limit - lower_limit + 1 - multi_c_d)
Problem: p02995
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())

nc = int(b/c) - int((a-1)/c)


nd = int(b/d) - int((a-1)/d)


def gcd(a, b):
    if a < b:
        a,b = b,a
    while (a%b)!=0:
        a,b = b, a%b
    return b

def lcm(a, b):
    return (a*b)

ncd = int(b/lcm(c,d)) - int((a-1)/lcm(c,d))


u = b - a + 1


ans = u - nc - nd + ncd

print(ans)

Failing test case input:
11519628362605307 4466928324079138 391 3058835041

Expected output:
-7034662440314272


Actual output:
-7034662440219922


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())

nc = (b


nd = (b


def gcd(a, b):
    if a < b:
        a,b = b,a
    while (a%b)!=0:
        a,b = b,a%b
    return b

def lcm(a, b):
    return (a*b)

ncd = (b


u = b - a + 1


ans = u - nc - nd + ncd

print(ans)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C, D = map(int, input().split())


def gcd(a, b):
  if b == 0:
    return a
  else:
    return gcd(b, a % b) 
    

div_c = int(B/C)

div_d = int(B/D)

mygcd = gcd(C, D)
l = int((C*D)/mygcd) 
div_gcd = int(B/l)
myansB = B - div_c -div_d + div_gcd


div_cA = int((A-1)/C)

div_dA = int((A-1)/D)

div_gcdl = int((A-1)/l)
myansA = A-1 - div_cA -div_dA + div_gcdl

print(myansB-myansA)




Failing test case input:
2378114867615524 188107035759759287 33 70304397

Expected output:
180100769372579622


Actual output:
180100769372579621


Fixed submission (verdict: Accepted):
A, B, C, D = map(int, input().split())


def gcd(a, b):
  if b == 0:
    return a
  else:
    return gcd(b, a % b) 
    

div_c = int(B

div_d = int(B

mygcd = gcd(C, D)
l = int((C*D)
div_gcd = int(B
myansB = B - div_c -div_d + div_gcd


div_cA = int((A-1)

div_dA = int((A-1)

div_gcdl = int((A-1)
myansA = A-1 - div_cA - div_dA + div_gcdl

print(myansB-myansA)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def GCD(a,b):
  if a<b:
    tmp = a
    a = b
    b = tmp
 
  r = a % b
  while (r!=0): 
    a = b
    b = r
    r = a % b
  return b


A,B,C,D = map(int,input().split())

upperC = int(B / C)
upperD = int(B / D)
lowerC = int(A / C)
lowerD = int(A / D)

numC = upperC - lowerC
numD = upperD - lowerD

gcd = GCD(C,D)

lcm = C * D / gcd
upperL = int(B / lcm)
lowerL = int(A / lcm)
numL = upperL - lowerL

print(str(B - A + 1 - (numC + numD - numL)))




Failing test case input:
6354199306375155 11488237810087203 9 91372231

Expected output:
4563589731132336


Actual output:
4563589731132337


Fixed submission (verdict: Accepted):
def GCD(a,b):
  if a<b:
    tmp = a
    a = b
    b = tmp
 
  r = a % b
  while (r!=0): 
    a = b
    b = r
    r = a % b
  return b


A,B,C,D = map(int,input().split())
A = A - 1
upperC = int(B 
upperD = int(B 
lowerC = int(A 
lowerD = int(A 

numC = upperC - lowerC
numD = upperD - lowerD

gcd = GCD(C,D)

lcm = C * D 
upperL = int(B 
lowerL = int(A 
numL = upperL - lowerL

print(str(B - A - (numC + numD - numL)))
Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fractions

a,b,c,d=map(int, input().split())

def lcm(x, y):
    return (x * y) 

x =int(b/c)-int(((a-1)/c))
y =int(b/d)-int(((a-1)/d))
n =lcm(c,d)
xy=int(b/n)-int((a/n))

ans = (b-a+1) - (x+y-xy)
print(ans)

Failing test case input:
11519628362605307 5772277299890772 252 5732805158

Expected output:
-5724544113058387


Actual output:
-5724544113054409


Fixed submission (verdict: Accepted):
import fractions
 
a,b,c,d=map(int, input().split())
 
def lcm(x, y):
    return (x * y) 
 
x =(b
y =(b
n =lcm(c,d)
xy=(b
 
ans = (b-a+1) - (x+y-xy)
print(ans)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,D = map(int, input().split())

def gcd(a, b):
  while b:
    a, b = b, a % b
  return a


def cnt(inp):
  min_ = inp * (int((A-1) / inp) + 1)
  max_ = inp * (int((B) / inp))
  num = (max_ - min_) / inp + 1

  return(int(num))

Ccnt = cnt(C)
Dcnt = cnt(D)
lcm = C*D 
CDcnt = cnt(lcm)


print((B+1-A)-Ccnt-Dcnt+CDcnt)


Failing test case input:
2755958446070485 108249065682174014 32 109641300

Expected output:
102196446793080235


Actual output:
102196446702877191


Fixed submission (verdict: Accepted):
A,B,C,D = map(int, input().split())

def gcd(a, b):
  while b:
    a, b = b, a % b
  return a


def cnt(inp):
  min_ = inp * (int((A-1) 
  max_ = inp * (int((B) 
  num = (max_ - min_) 

  return(int(num))

Ccnt = cnt(C)
Dcnt = cnt(D)
lcm = C*D 
CDcnt = cnt(lcm)


print((B+1-A)-Ccnt-Dcnt+CDcnt)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = [int(i) for i in input().split()]
lower_limit = num[0]
upper_limit = num[1]
c = num[2]
d = num[3]

def count_multi(x):
  count = upper_limit
                                 
  return count

multi_c_d = count_multi(c) + count_multi(d) - count_multi(c*d)
print(upper_limit - lower_limit + 1 - multi_c_d)

Failing test case input:
4445144871656471 60117910912501884 8 114898937

Expected output:
48713669861770016


Actual output:
-4445144871656470


Fixed submission (verdict: Accepted):
import fractions
num = [int(i) for i in input().split()]
lower_limit = num[0]
upper_limit = num[1]
c = num[2]
d = num[3]

def count_multi(x):
  count = upper_limit
  return count

cd_gcd = fractions.gcd(c, d)

multi_c_d = count_multi(c) + count_multi(d) - count_multi(c*d
print(upper_limit - lower_limit + 1 - multi_c_d)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
length=b-a+1
print(int(length-length/c-length/d+length/(c*d)))

Failing test case input:
49672545627402475 2302290213945793 3258358 1839634861

Expected output:
-47370240849631129


Actual output:
-47370240849631128


Fixed submission (verdict: Accepted):
import fractions
a,b,c,d=map(int,input().split())
length=b-a+1
lcm = c * d 
tmp=int(length-b
print(tmp)
Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
def gcd(a, b):
  while b:
    a, b = b, a%b
  return a

a, b, c, d = map(int, input().split())

tmp_b= b - math.floor(b/c) - math.floor(b/d)
tmp_b += math.floor(b/math.floor(c*d/gcd(c, d)))

tmp_a= (a-1) - math.floor((a-1)/c) - math.floor((a-1)/d)
tmp_a += math.floor((a-1)/math.floor(c*d/gcd(c, d)))

print(tmp_b-tmp_a)

Failing test case input:
2755958446070485 108249065682174014 20 109641300

Expected output:
100218451874298354


Actual output:
100218451874298353


Fixed submission (verdict: Accepted):
import math
from decimal import Decimal

a, b, c, d = map(Decimal, input().split())

def gcd(a, b):
  while b:
    a, b = b, a%b
  return a

def count(a, c, d):
    tmp_a= a - math.floor(a/c) - math.floor(a/d)
    tmp_a += math.floor(a/((c*d)/gcd(c, d)))
    return tmp_a

print(int(count(b,c,d))-int(count(a-1, c, d)))

Problem: p02995
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def gcd(x, y):
    while y > 0:
        x, y = y, x%y
    return x

def lcm(x, y):
    return x/gcd(x, y)*y


a, b, c, d = (int(i) for i in input().split())
m = lcm(c, d)

print((b-a+1)-(int((b)/c)-int((a-1)/c))-(int((b)/d)-int((a-1)/d))+(int((b)/(m))-int((a-1)/(m))))






Failing test case input:
4445144871656471 29010616170026159 8 114898937

Expected output:
21494787198997879


Actual output:
21494787198997878


Fixed submission (verdict: Accepted):
def gcd(x, y):
    while y > 0:
        x, y = y, x%y
    return x

def lcm(x, y):
    return x/gcd(x, y)*y


a, b, c, d = (int(i) for i in input().split())
m = int(lcm(c, d))

print((b-a+1)-(int((b)

Problem: p02995
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def GCD(a,b):
  if a<b:
    tmp = a
    a = b
    b = tmp
 
  r = a % b
  while (r!=0): 
    a = b
    b = r
    r = a % b
  return b


A,B,C,D = map(int,input().split())
A = A - 1
upperC = int(B / C)
upperD = int(B / D)
lowerC = int(A / C)
lowerD = int(A / D)

numC = upperC - lowerC
numD = upperD - lowerD

gcd = GCD(C,D)

lcm = C * D / gcd
upperL = int(B / lcm)
lowerL = int(A / lcm)
numL = upperL - lowerL

print(str(B - A - (numC + numD - numL)))

Failing test case input:
2378114867615524 188107035759759287 33 70304397

Expected output:
180100769372579622


Actual output:
180100769372579621


Fixed submission (verdict: Accepted):
def GCD(a,b):
  if a<b:
    tmp = a
    a = b
    b = tmp
 
  r = a % b
  while (r!=0): 
    a = b
    b = r
    r = a % b
  return b


A,B,C,D = map(int,input().split())
A = A - 1
upperC = int(B 
upperD = int(B 
lowerC = int(A 
lowerD = int(A 

numC = upperC - lowerC
numD = upperD - lowerD

gcd = GCD(C,D)

lcm = C * D 
upperL = int(B 
lowerL = int(A 
numL = upperL - lowerL

print(str(B - A - (numC + numD - numL)))