ZhenlongDai/ACPR huggingface dataset:
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a,b=map(int,input().split())
for i in range(a,b):
  if i%n==0:
    print("OK")
    break
  else:
    continue
else:
  print("NG")

Failing test case input:
4
6 8

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
n=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
  if i%n==0:
    print("OK")
    break
  else:
    continue
else:
  print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
a,b = map(int, input().split())

ans = "NG"
if k == 1:
    ans = "OK"
elif k >1000:
    ans = "NG"
else:
    for i in range(a, b):
        if (a + i) % k == 0:
            ans = "OK"
            break

print(ans)


Failing test case input:
4
3 4

Expected output:
OK


Actual output:
NG


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

ans = "NG"
if k == 1:
    ans = "OK"
elif k >1000:
    ans = "NG"
else:
    for i in range(a, b+1):
        if i % k == 0:
            ans = "OK"
            break

print(ans)

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

k = int(input())
a, b = list(map(int, input().split()))
if b-a > k or b % k == 0 or a % k == 0:
    print("OK")
else:
    print("NG")

Failing test case input:
4
6 9

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):

import sys
k = int(input())
a, b = list(map(int, input().split()))
for i in range(a, b+1):
    if i % k == 0:
        print("OK")
        sys.exit()
print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A, B = input().split()

a = int(A) 
b = int(B) 
if a == b and A !=B:
    print("NG")
else:
    print("OK")

Failing test case input:
4
1 2

Expected output:
NG


Actual output:
OK


Fixed submission (verdict: Accepted):
K = int(input())
A, B = input().split()


if  int(A) % K ==0 or int(B) % K ==0:
    print("OK")
elif int(A) 
    print("NG")
else:
    print("OK")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
a,b = map(int,input().split())
x = b-a

if k==1 and x==0:
    print("OK")
else:
    if k>x:
        print("NG")
    elif k==x:
        print("OK")
    else:
        print("OK")

Failing test case input:
4
2 5

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
k = int(input())
a,b = map(int,input().split())
ans=""
x = a-1
for i in range(b-a+1):
    x+=1
    if x%k==0:
        ans="OK"
        break
    else:
        ans="NG"
    
print(ans)

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
a,b = map(int,input().split())

ans = 'NG'

for i in range(a,k+1):
    if i % k == 0:
        ans = 'OK'
print(ans)


Failing test case input:
1
11 11

Expected output:
OK

Actual output:
NG


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

ans = 'NG'

for i in range(a,b+1):
    if i % k == 0:
        ans = 'OK'
print(ans)
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k= int(input())

x,y = map(int,input().split())
if 1<=x<=y<=1000 and 1<=k<=1000:
    pass



    if x%k>>0 :
        if x<= (x/k+1)*k <=y :
            print('OK')
        else:
            print('NG')
    else:
        print('OK')

else:
    print('NG')

Failing test case input:
4
-4 7

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
k= int(input())
x,y = map(int,input().split())
if 1<=x<=y<=1000 and 1<=k<=1000:
    pass



    if x%k>>0 :
        if x<= (x
            print('OK')
        else:
            print('NG')
    else:
        print('OK')

else:
    print('NG')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())

minMax = list(map(int,input().strip().split()))

A = minMax[0]
B = minMax[1]

if B-A >= K-1:
    print("OK")
else:
    print("NG")

Failing test case input:
4
3 4

Expected output:
OK


Actual output:
NG


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

minMax = list(map(int,input().strip().split()))

A = minMax[0]
B = minMax[1]

a = list(range(A,B+1)) 

b = list(map(lambda x: x % K, a))

if 0 in b:
     print("OK")
else:
     print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A,B = map(int,input().split())
if B - A >= K:
    print("OK")
else:
    print("NG")

Failing test case input:
4
1 4

Expected output:
OK


Actual output:
NG


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

if A % K == 0:
    print("OK")
elif (A 
    print("OK")
else:
    print("NG")

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


K = int (input())
line= list(map(int,input().split()))
a,b = line[0],line[1]
if (b-a+1)>=K:
    print("OK")

else:
    for i in range(a,b+1):
        if i%K==0:
            print("OK")
            break
    print("NG")

Failing test case input:
4
8 9

Expected output:
OK


Actual output:
OK
NG


Fixed submission (verdict: Accepted):


K = int (input())
line= list(map(int,input().split()))
a,b = line[0],line[1]
if b<K:
    print("NG")
    

else:
    for i in range(a,b+1):
        if i%K==0:
            print("OK")
            break
        elif i==b:
            print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import os
import sys
from collections import deque
from collections import Counter
from heapq import heappop,heappush

def main():
	k = int(input())
	a,b = map(int, input().split())
	if a == b:	
		print("Yes")
		sys.exit()
	if b - a >= k:
		print("Yes")
	else:
		print("NO")

if __name__ == "__main__":
	main()


Failing test case input:
7
782 1439

Expected output:
OK


Actual output:
Yes


Fixed submission (verdict: Accepted):
import os
import sys
from collections import deque
from collections import Counter
from heapq import heappop,heappush

def main():
	k = int(input())
	a,b = map(int, input().split())
	for i in range(b, a-1, -1):
		if i % k == 0:
			print("OK")
			sys.exit()
	print("NG")

if __name__ == "__main__":
	main()
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=int(input())
x,y = map(int,input().split())
count = 0
if x == y:
    if x % a == 0:
        count += 1
for i in range(x, y):
    if i % a == 0:
        count += 1

if count >= 1:
    print("OK")
else:
    print("NO")

Failing test case input:
4
1 4

Expected output:
OK


Actual output:
NO


Fixed submission (verdict: Accepted):
a=int(input())
x,y = map(int,input().split())
count = 0

for i in range(x, y + 1):
    if i % a == 0:
        count += 1

if count >= 1:
    print("OK")
else:
    print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A, B = map(int, input().split())

p = A % K
q = B % K

if A==B:
	if p==0:
		print("OK")
	else:
		print("NG")
  
else:
	if B-A>K:
		print("OK")
	else:
		if p+q >K:
			print("OK")
		else:
			print("NG")

Failing test case input:
4
6 9

Expected output:
OK


Actual output:
NG


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


ps = int(A / K)
pa = A % K
qs = int(B / K)
qa = B % K

if A==B:
	if pa==0:
		print("OK")
	else:
		print("NG")
else:
	if qs-ps>0:
		print("OK")
	else:
		if pa==0 or qa ==0:
			print("OK")
		else:
			print("NG")

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

K = int(input())
A, B = map(int, input().split())
if K == 1:
    print('OK')
else:
    print(['NG', 'OK'][(B % K) < (B - A)])

Failing test case input:
4
8 9

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):

K = int(input())
A, B = map(int, input().split())
if K == 1:
    print('OK')
else:
    print(['NG', 'OK'][(B % K) <= (B - A)])

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
K = int(input())
A,B = map(int,input().split())
for i in range(A,B+1):
  if i%K==0:
    print("OK")
    sys.exit()
print("No")

Failing test case input:
4
2 2

Expected output:
NG


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
K = int(input())
A,B = map(int,input().split())
for i in range(A,B+1):
  if i%K==0:
    print("OK")
    sys.exit(0)
print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k=int(input())
a,b=map(int,input().split())
if k<=2:
    print("OK")
elif b-a>=k:
    print("OK")
else:
    print("NG")

Failing test case input:
4
6 9

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
k=int(input())
a,b=map(int,input().split())
t=a
while t<b+1:
    if t%k==0:
        print("OK")
        exit()
    t+=1
print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
a, b = map(int, input().split())
c = b/k * k
if c >= k:
  print('OK')
else:
  print('NO')

Failing test case input:
4
1 3

Expected output:
NG


Actual output:
NO


Fixed submission (verdict: Accepted):
k = int(input())
a,b = map(int, input().split())
 
if (b 
  print('OK')
else:
  print('NG')
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a,b=map(int,input().split())
flag=False
for i in range(1000):
  ans=1+i
  if(a<=ans and b>=ans):
    if(ans%n==0):
      flag=True
      
if(flag):
  print("Ok")
else:
  print("NG")



Failing test case input:
4
4 23

Expected output:
OK


Actual output:
Ok


Fixed submission (verdict: Accepted):
n=int(input())
a,b=map(int,input().split())
flag=False
for i in range(1000):
  ans=1+i
  if(a<=ans and b>=ans):
    if(ans%n==0):
      flag=True
      
if(flag):
  print("OK")
else:
  print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input().split()
k=int(s[0])
s = input().split()
a=int(s[0])
b=int(s[1])
if k>1:
    if (b-a+1)/7>1:
        print('OK')
    else:
        print('NG')
else:
    print('OK')


Failing test case input:
4
1 5

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
s = input().split()
k=int(s[0])
s = input().split()
a=int(s[0])
b=int(s[1])
flag=0
for i in range(a,b+1):
    if i%k==0:
        flag=1
        break
if flag==0:
    print('NG')
else:
    print('OK')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())

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

if A % K == 0 and B % K == 0:
    print('OK')
else:
    print('NG')

Failing test case input:
4
2 66

Expected output:
OK


Actual output:
NG


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

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

b = B % K
w = B - A

if w - b >= 0:
    print('OK')
else:
    print('NG')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A,B = map(int,input().split(" "))
n=0
s='NG'
for k in range(K):
    n+=k
    if A<=n and n<=B:
        s='OK'
print(s)

Failing test case input:
4
12 18

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
K = int(input())
A,B = map(int,input().split(" "))
n=0
s='NG'
while(n<=B):
    n+=K
    if A<=n and n<=B:
        s='OK'
print(s)

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a, b = map(int, input().split())
for i in range(10000):
  if a <= n * i <= b:
    print("OK")
    break
else:
  print("NO")

Failing test case input:
4
1 1

Expected output:
NG


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
a, b = map(int, input().split())
for i in range(10000):
  if a <= n * i <= b:
    print("OK")
    break
else:
  print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = [input() for i in range(2)]
n = int(s[0])
l = s[1].split()
n1 = int(l[0])
n2 = int(l[1])
gap=n2-n1+1
m="NG"
for i in range(gap):
    if i+1 == n:
        m = "OK"
        break

print(m)


Failing test case input:
4
3 4

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
s = [input() for i in range(2)]
n = int(s[0])
l = s[1].split()
n1 = int(l[0])
n2 = int(l[1])
m="NG"
i=n1
while i <= n2:
    if i % n==0:
        m = "OK"
        break
    i +=1
print(m)
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


k = int(input())
a, b = map(int,input().split())

ans = 'NG'

h = b-a+1

for i in range(a, h, 1):
    if i % k == 0:
        ans = 'OK'

print(ans)

Failing test case input:
4
8 9

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):


k = int(input())
a, b = map(int,input().split())

ans = 'NG'

h = b-a+1

for i in range(h):
    p = a + i
    if p % k == 0:
        ans = 'OK'

print(ans)

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
a, b = map(int, input().split())
chk = False
for i in range(a+1, b+1):
    if i%k == 0:
        chk = True
        break
    else:
        pass
if chk == True:
    print('OK')
else:
    print('NG')

Failing test case input:
1
11 11

Expected output:
OK

Actual output:
NG


Fixed submission (verdict: Accepted):
k = int(input())
a, b = map(int, input().split())
chk = False
for i in range(a, b+1):
    if i%k == 0:
        chk = True
        break
    else:
        pass
if chk == True:
    print('OK')
else:
    print('NG')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
a, b = map(int, input().split())

for i in range(a, b+1):
    if i % k == 0:
        print('OK')
        break
print('NG')


Failing test case input:
4
3 4

Expected output:
OK


Actual output:
OK
NG


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

for i in range(a, b+1):
    if i % k == 0:
        print('OK')
        exit()
print('NG')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A,B = map(int,input().split())
c = 0

if (B-A) >= K:
  print("OK")
else:
  for i in range(K):
    if ( A + i ) < B:
      if ( A + i ) % K == 0:
        print("OK")
        c = 1
        break
if c == 0:
  print("NG")
    

Failing test case input:
4
-1 95

Expected output:
OK


Actual output:
OK
NG


Fixed submission (verdict: Accepted):
K = int(input())
A,B = map(int,input().split())
c = 0

if (B-A) >= K:
  print("OK")
  c = 1
else:
  for i in range(K):
    if ( A + i ) <= B:
      if ( A + i ) % K == 0:
        print("OK")
        c = 1
        break
if c == 0:
  print("NG")
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    

    def dump(*args):
        sys.stderr.write(str(args))

    k = int(input())
    a, b = map(int, input().split())
    c = 1
    d = 1
    while c <= b * 2:
        if a <= c <= b:
            print('OK')
            exit(0)
        c = k * d
        d += 1
    print('NG')


if __name__ == '__main__':
    main()


Failing test case input:
4
1 1

Expected output:
NG


Actual output:
OK


Fixed submission (verdict: Accepted):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    

    def dump(*args):
        sys.stderr.write(str(args))

    k = int(input())
    a, b = map(int, input().split())
    if k == 1:
        print('OK')
        exit(0)
    for i in range(b 
        if a <= i * k <= b:
            print('OK')
            exit(0)
    print('NG')


if __name__ == '__main__':
    main()

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from sys import stdin

def main():

    input = stdin.readline

    K = int(input())
    A,B = map(int,input().split())

    if (B - A + 1) >= K:
        print("OK")
    else:
        print("NG")

    
if __name__ == "__main__":
    main()

Failing test case input:
4
6 8

Expected output:
OK


Actual output:
NG


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

def main():

    input = stdin.readline

    K = int(input())
    A,B = map(int,input().split())

    for i in range(A,B+1):
        if i % K == 0:
            print("OK")
            return 0
    else:
        print("NG")

    
if __name__ == "__main__":
    main()

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A, B = map(int, input().split())

if K == 1:
    print('OK')
    exit()

for i in range(A, B):
    if i % K == 0:
        print('OK')
        exit()

print('NG')

Failing test case input:
4
3 4

Expected output:
OK


Actual output:
NG


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

for i in range(A, B+1):
    if i % K == 0:
        print('OK')
        exit()

print('NG')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A,B = map(int,input().split())
ans = "NG"
for i in range(A,B):
  if i % N == 0:
    ans = "OK"
    break
print(ans)

Failing test case input:
4
3 4

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
N = int(input())
A,B = map(int,input().split())
ans = "NG"
for i in range(A,B+1):
  if i % N == 0:
    ans = "OK"
    break
print(ans)
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A, B = map(int, input().split())

for i in range(A, B+1):
    if i % K == 0:
        print('OK')
    else:
        print('NG')

Failing test case input:
4
2 37

Expected output:
OK


Actual output:
NG
NG
OK
NG
NG
NG
OK
NG
NG
NG
OK
NG
NG
NG
OK
NG
NG
NG
OK
NG
NG
NG
OK
NG
NG
NG
OK
NG
NG
NG
OK
NG
NG
NG
OK
NG


Fixed submission (verdict: Accepted):
K = int(input())
A, B = map(int, input().split())
ans = 'NG'
for i in range(A, B+1):
    if i % K == 0:
        print('OK')
        break
else:
    print(ans)

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A, B = map(int, input().split())

print('OK' if (B-A >= K-A%K) else 'NG')


Failing test case input:
1
11 11

Expected output:
OK

Actual output:
NG


Fixed submission (verdict: Accepted):
K = int(input())
A, B = map(int, input().split())
 
print('OK' if (B-A >= (K-A%K)%K) else 'NG')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A, B = map(int, input().split())
largest = (B / K) * K  
if A <= largest:
  print("OK")
else:
  print("NG")

Failing test case input:
4
1 2

Expected output:
NG


Actual output:
OK


Fixed submission (verdict: Accepted):
K = int(input())
A, B = map(int, input().split())
largest = (B 
if A <= largest:
  print("OK")
else:
  print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K=int(input())
A,B=map(int,input().split())
flag=0
for i in range(A,B+1):
  if i%K==0:
    flag=1
    
    
if flag==1:
    print('OK')
    
else:
    print('NO')

Failing test case input:
4
2 2

Expected output:
NG


Actual output:
NO


Fixed submission (verdict: Accepted):
K=int(input())
A,B=map(int,input().split())
flag=0
for i in range(A,B+1):
  if i%K==0:
    flag=1
    
    
if flag==1:
    print('OK')
    
else:
    print('NG')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A, B = map(int, input().split())

a = A
b = B

if K > B:
    print ("NG")


elif b - a >0:
    print ("OK")
else:
    print ("NG")

Failing test case input:
4
5 7

Expected output:
NG

Actual output:
OK


Fixed submission (verdict: Accepted):
import math




K = int(input())
A, B = map(int, input().split())

a = math.ceil(A/K)

C = K * (a)


    


if C <= B:
    print ("OK")
else:
    print ("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())

A, B = map(int, input().split())
c = False
for i in range(A, B+1):
    if i % K == 0:
        c = True

print('OK' if c else 'No')

Failing test case input:
4
5 7

Expected output:
NG

Actual output:
No


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

A, B = map(int, input().split())
c = [i for i in range(A, B+1) if i % K == 0]

print('NG' if len(c) == 0 else 'OK')
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
a,b = map(int, input().split())
c = 0
for i in range(a,b+1):
  if(i%k==0):
    c+=1
if(c>=1):
  print("OK")
else:
  print("NO")

Failing test case input:
4
1 2

Expected output:
NG


Actual output:
NO


Fixed submission (verdict: Accepted):
k = int(input())
a,b = map(int, input().split())
c = 0
for i in range(a,b+1):
  if i%k==0:
    c+=1
if c>=1:
  print("OK")
else:
  print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
a, b = map(int, input().split())

if b - a >= k: print("OK")
else:
    c = b % k
    d = a % k
    if d >= c: print("OK")
    else: print("NG")

Failing test case input:
4
2 2

Expected output:
NG


Actual output:
OK


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

if b - a >= k - 1: print("OK")
else:
    c = b % k
    d = a % k
    if d > c or d == 0: print("OK")
    else: print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import os
import sys
from collections import deque
from collections import Counter
from heapq import heappop,heappush

def main():
	k = int(input())
	a,b = map(int, input().split())
	sub = b - a
	if sub == 0:
		print("OK")
		sys.exit()
	if sub <= k:
		print("OK")
		sys.exit()
	else:
		print("NG")
		sys.exit()



if __name__ == "__main__":
	main()


Failing test case input:
4
-4 4

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
import os
import sys
from collections import deque
from collections import Counter
from heapq import heappop,heappush

def main():
	k = int(input())
	a,b = map(int, input().split())
	for i in range(b, a-1, -1):
		if i % k == 0:
			print("OK")
			sys.exit()
	print("NG")

if __name__ == "__main__":
	main()

Problem: p02693
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
K = int(input())
A, B = map(int, input().split())
for i in range(1000):
  if A <= K*i <= B:
    print("OK")
    exit(0)
print("No")

Failing test case input:
4
5 7

Expected output:
NG

Actual output:
No


Fixed submission (verdict: Accepted):
K = int(input())
A, B = map(int, input().split())
for i in range(1000):
  if A <= K*i <= B:
    print("OK")
    exit(0)
print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
K = input()
AB = input().split()

if math.ceil(int(AB[1])/int(K)) <= math.ceil(int(AB[0])/int(K)):
    print('OK')
else:
    print('NG')

Failing test case input:
4
5 7

Expected output:
NG

Actual output:
OK


Fixed submission (verdict: Accepted):
import math
K = input()
AB = input().split()

K = int(K)
A = int(AB[0])
B = int(AB[1])

if B
    print('OK')
else:
    print('NG')
Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

K = int(input())
A, B = map(int,input().split())

if(A%K==0 or B%K==0 or (B-A>=K and B!=A)):
    print('OK')
else:
    print('NG')

Failing test case input:
4
2 5

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):

K = int(input())
A, B = map(int,input().split())

if(A%K==0 or B%K==0):
    print('OK')
elif(B-A >= K - A%K):
    print('OK')
else:
    print('NG')

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
A,B = map(int,input().split())
if K == 1:
    print("OK") 
elif B - A >= K:
    print("OK")
else:
    print("NG")

Failing test case input:
4
2 5

Expected output:
OK


Actual output:
NG


Fixed submission (verdict: Accepted):
K = int(input())
A,B = map(int,input().split())
x = A % K
if A % K == 0 or B % K == 0:
    print("OK")
elif K - x <= B-A:
    print("OK")
else:
    print("NG")

Problem: p02693
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())

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

if (B-A) % K !=0:
    print('OK')
else:
    print('NG')

Failing test case input:
4
2 26

Expected output:
OK


Actual output:
NG


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

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

if B 
    print('OK')
elif B % K == 0 or A % K == 0:
    print('OK')
else:
    print('NG')
Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


n,m =  list(map(int, input().split()))
a = []
for i in range(m):
    a.append( list(map(int, input().split())) ) 

b = []
for s in a:
    b.extend(s)
print(b)

for i in range (n):
    print(b.count(i+1))

Failing test case input:
8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8

Expected output:
3
3
2
2
2
1
1
2

Actual output:
[1, 2, 3, 4, 1, 5, 2, 8, 3, 7, 5, 2, 4, 1, 6, 8]
3
3
2
2
2
1
1
2


Fixed submission (verdict: Accepted):


n,m =  list(map(int, input().split()))
a = []
for i in range(m):
    a.append( list(map(int, input().split())) ) 

b = []
for s in a:
    b.extend(s)
for i in range (n):
    print(b.count(i+1))

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m=map(int,input().split())
a,b=map(int,input().split())
li=[]
li.append(a)
li.append(b)

for i in range(1,n+1):
    print(li.count(i))


Failing test case input:
8 7
2 2
3 6
1 5
2 8
2 7
5 6
4 1
6 8

Expected output:
2
4
1
1
2
2
1
1


Actual output:
0
2
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
n,m=map(int,input().split())
li=[]
for i in range(m):
    a,b=map(int,input().split())
    li.append(a)
    li.append(b)

for j in range(1,n+1):
    print(li.count(j))

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m=map(int,input().split())
l=[]
for i in range(m):
    a,b=map(int,input().split())
    l.append(a)
    l.append(b)

import collections
c = collections.Counter(l)
for i in c.values():
    print(i)


Failing test case input:
8 8
1 2
3 4
1 5
2 8
3 5
5 2
1 2
6 8

Expected output:
3
4
2
1
3
1
0
2


Actual output:
3
4
2
1
3
2
1


Fixed submission (verdict: Accepted):
n,m=map(int,input().split())
ans=[0]*n
l=[]
for i in range(m):
    a,b=map(int,input().split())
    l.append(a)
    l.append(b)

import collections
c = collections.Counter(l)

for k, v in c.items():
    ans[k-1]+=v

for i in ans:
    print(i)

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N,M = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(M)]
ans =[]
for i in range(1,M+1):
    count=0
    for j in range(M):
        if ab[j][0] ==i:
            count +=1
        if ab[j][1] ==i:
            count +=1
    ans.append(count)
for a in ans:
    print(a)

Failing test case input:
8 7
1 4
3 4
1 2
1 8
3 7
5 2
4 1
6 8

Expected output:
4
2
2
3
1
0
1
1


Actual output:
4
2
2
3
1
0
1


Fixed submission (verdict: Accepted):

N,M = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(M)]
ans =[]
for i in range(1,N+1):
    count=0
    for j in range(M):
        if ab[j][0] ==i:
            count +=1
        if ab[j][1] ==i:
            count +=1
    ans.append(count)
for a in ans:
    print(a)
Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
import sys

[N, M] = list(map(int, stdin.readline().rstrip().split()))

a = []
for i in range(M):
    a.append(list(map(int, stdin.readline().rstrip().split())))

city = []
for i in range(N):
    city.append([])

for i in range(M):
    [s, d] = a[i]
    city[s-1].append(d-1)
    city[d-1].append(s-1)

for i in range(N):
    if len(city[i]) > 0:
        print(len(city[i]))


Failing test case input:
8 8
1 2
3 8
2 5
2 8
3 5
5 2
1 2
5 2

Expected output:
2
6
2
0
4
0
0
2


Actual output:
2
6
2
4
2


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

[N, M] = list(map(int, stdin.readline().rstrip().split()))

a = []
for i in range(M):
    a.append(list(map(int, stdin.readline().rstrip().split())))

city = [[] for i in range(N+1)]

for i in range(M):
    [s, d] = a[i]
    city[s].append(d)
    city[d].append(s)

for i in range(1, N+1):
    if len(city[i]) >= 0:
        print(len(city[i]))

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
abm = [list(map(int,input().split())) for _ in range(m)]

countDic = {}

for ab in abm:
	countDic[ab[0]] = 0
	countDic[ab[1]] = 0
	
for ab in abm:
	countDic[ab[0]] += 1
	countDic[ab[1]] += 1

ks = countDic.keys()
ks = sorted(ks)

for k in ks:
	print(countDic[k])

Failing test case input:
8 7
1 4
3 4
1 5
1 8
3 7
5 2
4 1
6 8

Expected output:
4
1
2
3
2
0
1
1


Actual output:
4
1
2
3
2
1
1


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())
abm = [list(map(int,input().split())) for _ in range(m)]

countDic = {}

for nn in range(n+1):
	countDic[nn] = 0
	
for ab in abm:
	countDic[ab[0]] += 1
	countDic[ab[1]] += 1

ks = countDic.keys()
ks = sorted(ks)[1:]

for k in ks:
	print(countDic[k])

Problem: p03720
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,M=map(int,input().split())
city_l=[]
for i in range(M):
    a,b=map(int,input().split())
    city_l.append(a)
    city_l.append(b)
print(city_l)
for i in range(1,N+1):
    print(city_l.count(i))

Failing test case input:
8 7
2 2
3 6
1 5
2 8
3 7
5 2
4 1
6 8

Expected output:
2
4
2
1
2
1
1
1


Actual output:
[2, 2, 3, 6, 1, 5, 2, 8, 3, 7, 5, 2, 4, 1]
2
4
2
1
2
1
1
1


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())
city_l=[]
for i in range(M):
    a,b=map(int,input().split())
    city_l.append(a)
    city_l.append(b)
for i in range(1,N+1):
    print(city_l.count(i))
Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = list(map(int, input().split()))
from collections import defaultdict
d=defaultdict(list)
for _ in range(m):
    a,b = list(map(int, input().split()))
    d[a].append(b)
    d[b].append(a)

for k in sorted(d):
    print(len(d[k]))

Failing test case input:
8 7
1 2
5 4
1 5
1 8
3 7
5 2
4 1
6 8

Expected output:
4
2
1
2
3
0
1
1


Actual output:
4
2
1
2
3
1
1


Fixed submission (verdict: Accepted):
n,m = list(map(int, input().split()))
from collections import defaultdict
d=defaultdict(list)
for _ in range(m):
    a,b = list(map(int, input().split()))
    d[a].append(b)
    d[b].append(a)
ans=[0]*n
for k in d:
    ans[k-1]=len(d[k])
print(*ans, sep='\n')

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
city = {}
for i in ab:
  for j in i:
    if j not in city:
      city[j] = 1
    else:
      city[j] += 1
for v in city.values():
  print(v)

Failing test case input:
11 1
2 1
2 4
1 5
2 8
4 7
8 4
2 2
0 39

Expected output:
1
1
0
0
0
0
0
0
0
0
0


Actual output:
1
1


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
city = {}
for i in ab:
  for j in i:
    if j not in city:
      city[j] = 1
    else:
      city[j] += 1
for number in range(1, n+1):
  if number in city:
    print(city[number])
  else:
    print(0)

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N, M = map(int, input().split())
R = []
for i in range(M):
  R += list(map(int, input().split()))
R = Counter(R)
for i in R.values():
  print(i)

Failing test case input:
11 1
2 1
2 4
1 5
2 8
4 7
8 4
2 2
0 39

Expected output:
1
1
0
0
0
0
0
0
0
0
0


Actual output:
1
1


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
A = []
for i in range(M):
  A += list(map(int, input().split()))
B = [0 for i in range(N)]
for a in A:
  B[a - 1] += 1
for b in B:
  print(b)

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m=map(int,input().split())
l=[]
for i in range(m):l=list(map(int,input().split()))
for j in range(1,n+1):print(l.count(j))

Failing test case input:
13 7
2 4
3 4
1 5
2 8
3 7
5 2
4 1
6 8

Expected output:
2
3
2
3
2
0
1
1
0
0
0
0
0


Actual output:
1
0
0
1
0
0
0
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
n,m=map(int,input().split())
l=" ".join([input() for _ in [0]*m])
for i in range(1,n+1):print(l.split().count(str(i)))
Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
table = input().split()
N,M = int(table[0]),int(table[1])
hyou = []
for i in range(M):
    ith = input().split()
    hyou += ith
hyou = list(map(int,hyou))
print(hyou)
j = 1
while j <= N:
    print(hyou.count(j))
    j += 1

Failing test case input:
11 1
2 1
2 4
1 5
2 8
4 7
8 4
2 2
0 39

Expected output:
1
1
0
0
0
0
0
0
0
0
0


Actual output:
[2, 1]
1
1
0
0
0
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
table = input().split()
N,M = int(table[0]),int(table[1])
hyou = []
for i in range(M):
    ith = input().split()
    hyou += ith
hyou = list(map(int,hyou))
j = 1
while j <= N:
    print(hyou.count(j))
    j += 1

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int, input().split())
roads = [list(map(lambda x:int(x)-1, input().split())) for _ in range(m)]

for r in roads:
    print(r)

arr = [0]*n
for r in roads:
    arr[r[0]] +=1
    arr[r[1]] +=1

for a in arr:
    print(a)

Failing test case input:
5 5
1 2
1 1
1 2
1 1
1 2

Expected output:
7
3
0
0
0


Actual output:
[0, 1]
[0, 0]
[0, 1]
[0, 0]
[0, 1]
7
3
0
0
0


Fixed submission (verdict: Accepted):
n,m = map(int, input().split())
roads = [list(map(lambda x:int(x)-1, input().split())) for _ in range(m)]

arr = [0]*n
for r in roads:
    arr[r[0]] +=1
    arr[r[1]] +=1

for a in arr:
    print(a)

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M = map(int,input().split())
res = {}
for _ in range(M):
    a,b = map(int,input().split())
    if a in res.keys():
        res[a] += 1
    else:
        res[a] = 1
    if b in res.keys():
        res[b] += 1
    else:
        res[b] = 1
for key,value in sorted(res.items()):
    print(value)

Failing test case input:
5 5
1 2
1 1
1 2
1 1
1 2

Expected output:
7
3
0
0
0


Actual output:
7
3


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())
res = {}
for i in range(1,N+1):
    res[i] = 0
for _ in range(M):
    a,b = map(int,input().split())
    res[a] += 1
    res[b] += 1
for key in sorted(res.keys()):
    print(res[key])

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N, M = map(int, input().split())

    R = [[0]*N for x in range(N)]
    for n in range(M):
        a, b = map(lambda x:int(x)-1, input().split())
        R[a][b] = 1
        R[b][a] = 1

    for n in range(N):
        print(sum(R[n]))

if __name__ == "__main__":
    
    
    main()



Failing test case input:
8 7
3 2
3 3
1 5
2 8
3 7
5 2
4 1
6 8

Expected output:
2
3
4
1
2
0
1
1


Actual output:
2
3
3
1
2
0
1
1


Fixed submission (verdict: Accepted):
def main():
    N, M = map(int, input().split())

    R = [[0]*N for x in range(N)]
    for n in range(M):
        a, b = map(lambda x:int(x)-1, input().split())
        R[a][b] += 1
        R[b][a] += 1

    for n in range(N):
        print(sum(R[n]))

if __name__ == "__main__":
    
    
    main()
Problem: p03720
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,M = map(int,input().split())
A = [0] * (N + 1)

for i in range(M):
    a,b = map(int,input().split())

    A[a] += 1
    A[b] += 1

for a in A:
    if a != 0:
        print(a)

Failing test case input:
8 7
2 3
3 4
1 5
3 8
3 7
5 2
5 1
6 8

Expected output:
2
2
4
1
3
0
1
1


Actual output:
2
2
4
1
3
1
1


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())
A = [0] * (N)

for i in range(M):
    a,b = map(int,input().split())

    A[a-1] += 1
    A[b-1] += 1

for a in A:
    
    print(a)

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m=map(int,input().split())
city=[[] for i in range(n+1)]
for i in range(m):
  a,b=map(int,input().split())
  city[a].append(b)
  city[b].append(a)
for i in range(1,n+1):
  print(len(set(city[i])))


Failing test case input:
8 8
1 2
3 4
1 5
2 8
3 5
5 1
1 2
6 8

Expected output:
4
3
2
1
3
1
0
2


Actual output:
2
2
2
1
2
1
0
2


Fixed submission (verdict: Accepted):
n,m=map(int,input().split())
city=[[] for i in range(n+1)]
for i in range(m):
  a,b=map(int,input().split())
  city[a].append(b)
  city[b].append(a)
for i in range(1,n+1):
  print(len(city[i]))

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

N,M = map(int,input().split())
adj = [[0]*N for _ in range(N)]
intx = lambda x: int(x)-1
for i in range(M):
    a,b = map(intx,input().split())
    
    adj[a][b] = 1
    adj[b][a] = 1
for i in range(N): 
    print(sum(adj[i]))

Failing test case input:
8 7
1 4
3 4
1 5
1 8
3 7
5 2
4 1
6 8

Expected output:
4
1
2
3
2
0
1
1


Actual output:
3
1
2
2
2
0
1
1


Fixed submission (verdict: Accepted):

N,M = map(int,input().split())
adj = [[0]*N for _ in range(N)]
intx = lambda x: int(x)-1
for i in range(M):
    a,b = map(intx,input().split())
    
    adj[a][b] += 1
    adj[b][a] += 1

for i in range(N): 
    print(sum(adj[i]))

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
N, M = map(int, input().split())

num = []
for i in range(M):
    a, b = map(int, input().split())
    num.append(a)
    num.append(b)
    
num.sort()
count = collections.Counter(num)
countkey = list(count.keys())
for i in countkey:
    print(count[i])



Failing test case input:
8 7
1 3
3 4
1 5
3 8
1 7
1 2
7 1
6 14

Expected output:
5
1
3
1
1
0
2
1


Actual output:
5
1
3
1
1
2
1


Fixed submission (verdict: Accepted):
import collections
N, M = map(int, input().split())

num = []
for i in range(M):
    a, b = map(int, input().split())
    num.append(a)
    num.append(b)

for i in range(1, N+1):
    print(num.count(i))
Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
es = [[] for _ in range(n)]
for _ in range(m):
  s, t = map(int, input().split())
  es[s-1].append(t-1)
  es[t-1].append(s-1)
for i in range(n):
  print(len(list(set(es[i]))))
  

Failing test case input:
8 7
1 3
3 4
1 5
2 8
3 7
1 4
4 1
6 14

Expected output:
4
1
3
3
1
0
1
1


Actual output:
3
1
3
2
1
0
1
1


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
es = [[] for _ in range(n)]
for _ in range(m):
  s, t = map(int, input().split())
  es[s-1].append(t-1)
  es[t-1].append(s-1)
for i in range(n):
  print(len(es[i]))

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections

def main():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for i in range(m)]
    ab_f = [flatten for inner in  ab for flatten in inner]
    c = collections.Counter(ab_f)
    c_s = sorted(c.items())
    for i in (c_s):
        print(i[1])
if __name__ == '__main__':
    main()

Failing test case input:
11 7
2 4
3 4
1 5
2 8
8 7
8 2
4 1
0 14

Expected output:
2
3
1
3
1
0
1
3
0
0
0


Actual output:
2
3
1
3
1
1
3


Fixed submission (verdict: Accepted):
def main():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for i in range(m)]
    res = [0] * n
    for i in ab:
        res[i[0] - 1] += 1
        res[i[1] - 1] += 1
    for i in res:
        print(i)
if __name__ == '__main__':
    main()

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,  M = [int(i) for i in input().split()]
citys = {}
for i in range(M):
    for c in [int(i) for i in input().split()]:
        if c in citys:
            citys[c] += 1
        else:
            citys[c] = 1

for key, val in sorted(citys.items()):
    print(val)

Failing test case input:
8 7
1 2
5 4
1 5
1 8
3 7
5 2
4 1
6 8

Expected output:
4
2
1
2
3
0
1
1


Actual output:
4
2
1
2
3
1
1


Fixed submission (verdict: Accepted):
N,  M = [int(i) for i in input().split()]
cities = {}
for i in range(N):
    cities[i+1] = 0
for i in range(M):
    for c in [int(i) for i in input().split()]:
        cities[c] += 1
for key, val in sorted(cities.items()):
    print(val)

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
city = {}
for i in ab:
  for j in i:
    if j not in city:
      city[j] = 1
    else:
      city[j] += 1
for number in range(n):
  if number in city:
    print(city[number])
  else:
    print(0)

Failing test case input:
8 7
1 2
5 8
1 5
1 8
3 7
5 2
4 1
6 8

Expected output:
4
2
1
1
3
0
1
2


Actual output:
0
4
2
1
1
3
0
1


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
city = {}
for i in ab:
  for j in i:
    if j not in city:
      city[j] = 1
    else:
      city[j] += 1
for number in range(1, n+1):
  if number in city:
    print(city[number])
  else:
    print(0)
Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections

n, m = list(map(int, input().split()))

dic = collections.defaultdict(int)
for _ in range(m):
    a, b = list(map(int, input().split()))
    dic[a] += 1
    dic[b] += 1

for key, val in dic.items():
    print(val)


Failing test case input:
8 7
2 4
3 4
1 6
2 8
1 7
5 2
4 2
0 14

Expected output:
2
4
1
3
1
1
1
1


Actual output:
4
3
1
2
1
1
1
1


Fixed submission (verdict: Accepted):
n, m = list(map(int, input().split()))

dic = {k: 0 for k in range(n)}
for _ in range(m):
    a, b = list(map(int, input().split()))
    dic[a-1] += 1
    dic[b-1] += 1

for key in sorted(dic.keys()):
    print(dic[key])

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
info = list()
for i in range(0, n + 1):
    info.append(0)
for i in range(0, m):
    a, b = map(int, input().split())
    info[a] = info[a] + 1
    info[b] = info[b] + 1
for value in info:
    print(value)

Failing test case input:
8 7
2 4
3 4
1 5
2 8
3 7
5 2
4 2
0 8

Expected output:
1
4
2
3
2
0
1
1


Actual output:
0
1
4
2
3
2
0
1
1


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
info = list()
for i in range(0, n + 1):
    info.append(0)
for i in range(0, m):
    a, b = map(int, input().split())
    info[a] = info[a] + 1
    info[b] = info[b] + 1
for i, value in enumerate(info):
    if i is not 0:
        print(value)

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m=map(int,input().split())
l=list(map(int,open(0).read().split()))
print(*[l.count(i+1) for i in range(n)],sep='\n')

Failing test case input:
8 8
1 2
3 4
1 5
2 8
3 5
5 2
1 2
6 8

Expected output:
3
4
2
1
3
1
0
2


Actual output:
0
0
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
n,m=map(int,input().split())
l=[]
for _ in range(m):
    l+=list(map(int,input().split()))
print(*[l.count(i+1) for i in range(n)],sep='\n')

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
ab = [list(map(int,input().split())) for i in range(m)]
list = {}
for i in range(m):
  for j in range(2):
    num=ab[i][j]
    if num in list:
      list[num] += 1
    else:
      list[num] = 1
for j in list.values():
  print(j)
  

Failing test case input:
3 3
1 1
2 1
2 2
2 1
1 2

Expected output:
3
3
0


Actual output:
3
3


Fixed submission (verdict: Accepted):

n,m = map(int,input().split())
ab = [list(map(int,input().split())) for i in range(m)]
list = {i:0 for i in range(1,n+1)}
for i in ab:
  list[i[0]] += 1
  list[i[1]] += 1
for j in list.values():
  print(j)
Problem: p03720
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, m = map(int, input().split())
 
a = []
 
for i in range(m):
  a1, a2 = map(int, input().split())
  a.append(a1)
  a.append(a2)
 
for s in range(n):
  print(a.count(s))

Failing test case input:
11 7
2 4
3 4
1 5
2 8
2 7
8 2
4 1
0 14

Expected output:
2
4
1
3
1
0
1
2
0
0
0


Actual output:
0
2
4
1
3
1
0
1
2
0
0


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
 
a = []
 
for i in range(m):
  a1, a2 = map(int, input().split())
  a.append(a1)
  a.append(a2)
 
for s in range(n):
  print(a.count(s+1))

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections


n, m = map(int, input().split())
li = []

for i in range(m):
    a, b = map(int, input().split())
    li.append(a)
    li.append(b)

c = collections.Counter(li)

for k, v in sorted(c.items(), key=lambda x: x[0]):
    print(v)


Failing test case input:
8 3
1 2
3 4
2 5
2 8
3 5
5 3
1 2
5 2

Expected output:
1
2
1
1
1
0
0
0


Actual output:
1
2
1
1
1


Fixed submission (verdict: Accepted):
import collections


n, m = map(int, input().split())
li = []

for i in range(n):
    li.append(i+1)


for i in range(m):
    a, b = map(int, input().split())
    li.append(a)
    li.append(b)

c = collections.Counter(li)

for k, v in sorted(c.items(), key=lambda x: x[0]):
        print(v-1)

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict
n, k = map(int, input().split())
d = defaultdict(int)
for _ in [0]*k:
  a, b = map(int, input().split())
  d[a] += 1
  d[b] += 1
for i in range(n):
  print(d[i])

Failing test case input:
8 7
1 3
3 4
1 5
2 8
3 7
5 2
5 1
6 8

Expected output:
3
2
3
1
3
0
1
1


Actual output:
0
3
2
3
1
3
0
1


Fixed submission (verdict: Accepted):
from collections import defaultdict
n, k = map(int, input().split())
d = defaultdict(int)
for _ in [0]*k:
  a, b = map(int, input().split())
  d[a] += 1
  d[b] += 1
for i in range(n):
  print(d[i+1])

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=map(int,input().split())

graph=[set() for _ in range(N+1)]
for i in range(M):
  a,b=map(int,input().split())
  graph[a].add(b)
  graph[b].add(a)


for i in range(1,N+1):
  print(len(graph[i]))

Failing test case input:
11 7
2 4
3 4
1 5
2 8
4 7
8 2
4 1
0 14

Expected output:
2
3
1
4
1
0
1
2
0
0
0


Actual output:
2
2
1
4
1
0
1
1
0
0
0


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())

graph=[[] for _ in range(N+1)]
for i in range(M):
  a,b=map(int,input().split())
  graph[a].append(b)
  graph[b].append(a)


for i in range(1,N+1):
  print(len(graph[i]))
Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict
n,m=map(int,input().split())
graph = defaultdict(list)
for i in range(m):
  a,b=map(int, input().split())
  graph[a].append(b)
  graph[b].append(a)

for key in sorted(graph.keys()):
  print(len(graph[key]))

Failing test case input:
8 8
1 2
3 4
1 5
2 8
3 5
5 2
1 2
5 5

Expected output:
3
4
2
1
5
0
0
1


Actual output:
3
4
2
1
5
1


Fixed submission (verdict: Accepted):
from collections import defaultdict
n,m=map(int,input().split())
graph = defaultdict(list)
for i in range(m):
  a,b=map(int, input().split())
  graph[a-1].append(b-1)
  graph[b-1].append(a-1)

for i in range(0,n):
  if i not in graph:
    print(0)
  else:
    print(len(graph[i]))

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
road = ""

for _ in range(m):
    a, b = map(str, input().split())
    road += a + b
print(road)
for i in range(n):
    print(int(road.count(str(i+1))))

Failing test case input:
8 7
1 3
3 4
1 5
4 8
3 7
1 4
4 1
6 14

Expected output:
4
0
3
4
1
0
1
1


Actual output:
13341548371441
4
0
3
4
1
0
1
1


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
road = [0]*n

for _ in range(m):
    a, b = map(int, input().split())
    road[a-1] += 1
    road[b-1] += 1
for i in range(n):
    print(road[i])

Problem: p03720
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = [int(i) for i in input().split(" ")]

lst = []

for i in range(0,M):
	lst.extend(input().split(" "))
    
print(lst)

for i in range(1,N+1):
	print(lst.count("{}".format(i)))


Failing test case input:
8 8
1 2
3 4
2 5
2 8
3 7
5 2
5 4
6 8

Expected output:
1
4
2
2
3
1
1
2


Actual output:
['1', '2', '3', '4', '2', '5', '2', '8', '3', '7', '5', '2', '5', '4', '6', '8']
1
4
2
2
3
1
1
2


Fixed submission (verdict: Accepted):
N, M = [int(i) for i in input().split(" ")]
lst = []

for i in range(0,M):
	lst.extend(input().split(" "))
for i in range(1,N+1):
	print(lst.count("{}".format(i)))

Problem: p03720
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import defaultdict

N, M = map(int, input().split())

memo = defaultdict(int)

for _ in range(M):
    a, b = map(int, input().split())
    memo[a] += 1
    memo[b] += 1

memo = sorted(memo.items(), key=lambda x: x[0])

for m in memo:
    print(m[1])

Failing test case input:
8 7
1 3
3 4
1 5
3 8
1 7
1 2
7 1
6 14

Expected output:
5
1
3
1
1
0
2
1


Actual output:
5
1
3
1
1
2
1


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

N, M = map(int, input().split())

memo = [0]*N

for _ in range(M):
    a, b = map(int, input().split())
    memo[a-1] += 1
    memo[b-1] += 1

print(*memo, sep="\n")