Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02693 (python)

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

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

Buggy submission (verdict: Runtime Error):
K = int(input())
A, B = map(int,input().split())
tmp = A % k
if(tmp == 0): 
	print('OK')
else:
	if(A + (K-tmp) <= B):
		print('OK')
	else:
		print('NG')

Buggy submission (verdict: Runtime Error):
K = int(input())
A, B = map(int,input().split())
tmp = a % k
if(tmp == 0): 
	print('OK')
else:
	if(A + (K-tmp) <= B):
		print('OK')
	else:
		print('NG')
Problem p03242 (python)

Fixed submission:
S=input()
ans=""
for s in S:
  if s=="1":ans+="9"
  else:ans+="1"
print(ans)

Buggy submission (verdict: Runtime Error):
S=list(input())
S=[if s=="1" s="9" else s="1" for s in S]
print(S)
Problem p02754 (python)

Fixed submission:
line = input().split(" ")

N, A, B = int(line[0]), int(line[1]), int(line[2])

S = A + B
if S == 0:
    print(0)
    exit(0)
div, mod = divmod(N, S)

answer = div * A
answer += mod if mod < A else A
print(answer)

Buggy submission (verdict: Runtime Error):
line = input().split(" ")

N, A, B = int(line[0]), int(line[1]), int(line[2])

buff = []
for i in range(int(N/(A+B))+1):
    buff.extend([1]*A)
    buff.extend([0]*B)

print(sum(buff[:N]))
Problem p02693 (python)

Fixed submission:
N = int(input())
A=input().split()

s=int(A[0])//N
if int(A[0])%N==0:
    print('OK')
else:
    if (s+1)*N>int(A[1]):
        print('NG')
    else:
        print('OK')

Buggy submission (verdict: Runtime Error):
import math
N = int(input())

y<math.log(1.01, N/100)
print(y)

Buggy submission (verdict: Runtime Error):
N = int(input())
A=input().split()

s=int(A[0])//N
if int(A[0])%N==0:
    print('OK')
else:
    if (s+1)*N>=A[1]:
        print('NG')
    else:
        print('OK')

Buggy submission (verdict: Runtime Error):
N = input()
A=input().split()

s=int(A[0])//int(N)
if int(A[0])%int(N)==0:
    print('OK')
else:
    if (s+1)*N=>A[1]:
        print('NG')
    else:
        print('OK')

Buggy submission (verdict: Runtime Error):
N = input()
A=input().split()

s=int(A[0])/int(N)
if (s+1)*N>A[1]:
    print('NG')
else:
    print('OK')
Problem p02693 (python)

Fixed submission:
K = int(input())
A,B = map(int,input().split())
a = A// K
b = B // K
if a != b and a !=0 or A % K == 0 or B % K ==0:
    print('OK')
else:
    print('NG')

Buggy submission (verdict: Runtime Error):
1
11 11
Problem p02859 (python)

Fixed submission:
r=int(input())
print(int(r**2))

Buggy submission (verdict: Runtime Error):
r=int(input())
print(int(r**2)
Problem p02860 (python)

Fixed submission:
N = int(input())
S = input()
n = len(S)
if n % 2 == 0:
    if S[:n // 2] == S[n // 2:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N, S = map(int, input().split())
n = len(S)
if n % 2 == 0:
    if S[:n // 2] == S[n // 2:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N, S = map(int, input().split())
n = len(S)
if n % 2 == 0:
    if S[:n // 2] == S[n // 2:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Problem p02862 (python)

Fixed submission:
X, Y = map(int,input().split())
# https://qiita.com/derodero24/items/
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

if (X+Y)%3!=0:
    print(0)
else:
    itr=(X+Y)//3
    x_mx=itr*2
    if itr<=X and X<=x_mx and itr<=Y and Y<=x_mx and X+Y==itr+x_mx:
        c=X-itr
        f=cmb(itr, c)
        f=f%(10**9+7)
        print(f)
    else:
        print(0)

Buggy submission (verdict: Runtime Error):
from math import factorial
X, Y = map(int,input().split())
if (X+Y)%3!=0:
    print(0)
else:
    itr=(X+Y)//3
    x_mx=itr*2
    flag=0
    ir=-1
    for i in range(itr,x_mx+1,1):
        ir+=1
        if X==i and Y==x_mx-ir:
            flag=1
            break
    print(flag)
    if flag==1:
        g=factorial(itr)/factorial(ir) / factorial(itr-ir)
        print(int(g%(10**9+7)))
    elif flag==0:
        print(0)
Problem p02879 (python)

Fixed submission:
A,B = map(int,input().split())
if A>=10 or B>=10:
   print(-1)
else:
   print(A*B)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
M = int(math.sqrt(N))
for i in range(M, 0, -1):
    if N % i == 0:
        A = N / i
        print(int(A + i - 2))
        break

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
M = int(math.sqrt(N))
for i in range(M, 0, -1):
    if N % i == 0:
        A = N / i
    	print(A + i - 2)
    	break

Buggy submission (verdict: Runtime Error):
N = int(input())

for i in range(1, 10):
    for j in range(1, 10):
        if i * j == N:
            break
    if i * j == N:
        print("Yes")
        break
    elif i == 9 and i * j != N:
        print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
 
for i in range(1,10):
  for j in range(1,10):
    if i*j==N:
      break
  if i*j==N:
    print("Yes")
    break
  elif i==9 and i*j!=N:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
 
for i in range(1,10):
  for j in range(1,10):
    if i*j=N:
      break
  if i*j=N:
    print("Yes")
    break
  elif i==9 and i*j!=N:
    print("No")

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if A>=10 or B>10:
  print(-1)
else:
  print(A*B)
Problem p02880 (python)

Fixed submission:
N = int(input())

for i in range(1, 10):
    for j in range(1, 10):
        if i * j == N:
            break
    if i * j == N:
        print("Yes")
        break
    elif i == 9 and i * j != N:
        print("No")

Buggy submission (verdict: Runtime Error):
for i in range(1, 10):
    for j in range(1, 10):
        if i * j == N:
            break
    if i * j == N:
        print("Yes")
        break
    elif i == 9 and i * j != N:
        print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
 
for i in range(1,10):
  for j in range(1,10):
    if i*j=N:
      break
  if i*j=N:
    print("Yes")
      break
  elif i==9 and i*j!=N:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
 
for i in range(9,1,-1):
	if N%i==0:
      if N//i==1:
        print("Yes")
        break
      for j in range(9,1,-1):
      	if N%(i*j)==0:
          print("Yes")
          break
      	print("No")
        break

Buggy submission (verdict: Runtime Error):
N = int(input())
 
for i in range(9,1,-1):
	if N%i==0:
      if N//i==1:
        print("Yes")
      for j in range(9,1,-1):
      	if N%(i*j)==0:
          print("Yes")
          break
      	print("No")
        break

Buggy submission (verdict: Runtime Error):
N = int(input())

for i in range(9,0,-1):
	if N%i==0:
      for j in range(9,0,-1):
      	if N%(i*j)==0:
          print("Yes")
        else:
          print("No")
Problem p02881 (python)

Fixed submission:
import math
N = int(input())
M = int(math.sqrt(N))
for i in range(M, 0, -1):
    if N % i == 0:
        A = N / i
        print(int(A + i - 2))
        break

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
M = int(math.sqrt(N))
for i in range(M, 0, -1):
    if N % M == 0:
        A = N / M
    	print(A + M - 2)
    	break

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
M = int(math.sqrt(N))
for i in range(M, 0, -1):
    if N % M == 0:
        A = N // M
    	print(A + M - 2)
    	break

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
M=int(math.sqrt(N))
for i in range(M,0,-1):
	if N%M==0:
    	A=N//M
      	print(A+M-2)
      	break

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
M=int(math.sqrt(N))
for i in range(M,0,-1):
	if N%M==0:
      A=N//M
      print(A+M-2)
      break
Problem p02897 (python)

Fixed submission:
N=int(input())
if N%2==0:
  print((N//2)/N)
else:
  print(((N//2)+1)/N)

Buggy submission (verdict: Runtime Error):
N=int(input())
if N%2==0
 print(N//2)
else:
  print(N//2+1)
Problem p02915 (python)

Fixed submission:
N=int(input())
print(N**3)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))
a=0
for co,i in enumerate(A):
    if co==0 :
        a+=B[i-1]
    if co>=1 :
        if A[co-1]+1==A[co]:
            a+=B[i-1]
            a+=C[A[co-1]-1]
        else:
            a+=B[i-1]
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))
a=0
for co,i in enumerate(A):
    if co==0 :
        a+=B[i-1]
    if co>=1 :
        if A[co-1]!=N:
            a+=B[i-1]
            a+=C[A[co-1]-1]
        else:
            a+=B[i-1]
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))
a=0
for co,i in enumerate(A):
    a+=B[i-1]
    if co>=1 :
        if A[co-1-1]!=N:
            a+=C[A[co-1]-1]
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))
a=0
for i in A[:-1]:
    a+=B[i-1]   
if A[-2]==N:
    a+=B[A[-1]-1]
else:
    a+=B[A[-1]-1]+C[A[-2]-1]
print(a)
Problem p02916 (python)

Fixed submission:
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))
a=0
for co,i in enumerate(A):
    if co==0 :
        a+=B[i-1]
    if co>=1 :
        if A[co-1]+1==A[co]:
            a+=B[i-1]
            a+=C[A[co-1]-1]
        else:
            a+=B[i-1]
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))
a=0
for co,i in enumerate(A[):
    a+=B[i-1]
    if co>=1 :
        if A[co-1]!=N:
            a+=C[A[co-1]-1]
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))
a=0
for i in A[:-1]:
    a+=B[i-1]   
if A[-1]==N:
    a+=B[A[-1]]
else:
    a+=B[A[-1]-1]+C[A[-2]-1]
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))
a=0
for i in A[:-1]:
    a+=B[i-1]   
if A[-1]==N:
    a+=B[A[-1]]
else:
    a+=B[A[-1]-1]+C[A[-2]-1]
print(a)
Problem p02693 (python)

Fixed submission:
import sys
input = sys.stdin.readline
import random
import copy


def main():
     k=int(input())
     a,b = map(int,input().split())
     for x in range(a,b+1):
          if x%k==0:
               print("OK")
               return
     print("NG")
                    
main()

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import random
import copy
import math
def main():
     A,B,N = map(int,input().split())
     x = min(B,N)-0.000000000000001
     ma = math.floor(A*x/B)-A*math.floor(x/B)
     print(ma)
                    
main()
Problem p02701 (python)

Fixed submission:
num = int(input());

mylist_1=[];
mylist_2=[];
mylist_3=[];
mylist_4=[];
mylist_5=[];
mylist_6=[];
mylist_7=[];
mylist_8=[];
mylist_9=[];
mylist_10=[];

for i in range(num):
  s = input();
  if len(s) == 1:
    mylist_1.append(s);
  elif len(s) == 2:
    mylist_2.append(s);
  elif len(s) == 3:
    mylist_3.append(s);
  elif len(s) == 4:
    mylist_4.append(s);
  elif len(s) == 5:
    mylist_5.append(s);
  elif len(s) == 6:
    mylist_6.append(s);
  elif len(s) == 7:
    mylist_7.append(s);
  elif len(s) == 8:
    mylist_8.append(s);
  elif len(s) == 9:
    mylist_9.append(s);
  elif len(s) == 10:
    mylist_10.append(s);
    

m1 = len(list(set(mylist_1)));
m2 = len(list(set(mylist_2)));
m3 = len(list(set(mylist_3)));
m4 = len(list(set(mylist_4)));  
m5 = len(list(set(mylist_5)));
m6 = len(list(set(mylist_6)));
m7 = len(list(set(mylist_7)));
m8 = len(list(set(mylist_8)));
m9 = len(list(set(mylist_9)));
m10 = len(list(set(mylist_10)));

m = m1 + m2 + m3 + m4 + m5 + m6 + m7 + m8 + m9 + m10;
print(m);

Buggy submission (verdict: Runtime Error):
num = int(input());

for i in range(num):
  s = input();
  if len(s) == 1:
    mylist_1.append(s);
  elif len(s) == 2:
    mylist_2.append(s);
  elif len(s) == 3:
    mylist_3.append(s);
  elif len(s) == 4:
    mylist_4.append(s);
  elif len(s) == 5:
    mylist_5.append(s);
  elif len(s) == 6:
    mylist_6.append(s);
  elif len(s) == 7:
    mylist_7.append(s);
  elif len(s) == 8:
    mylist_8.append(s);
  elif len(s) == 9:
    mylist_9.append(s);
  elif len(s) == 10:
    mylist_10.append(s);
    

m1 = len(list(set(mylist_1)));
m2 = len(list(set(mylist_2)));
m3 = len(list(set(mylist_3)));
m4 = len(list(set(mylist_4)));  
m5 = len(list(set(mylist_5)));
m6 = len(list(set(mylist_6)));
m7 = len(list(set(mylist_7)));
m8 = len(list(set(mylist_8)));
m9 = len(list(set(mylist_9)));
m10 = len(list(set(mylist_10)));

m = m1 + m2 + m3 + m4 + m5 + m6 + m7 + m8 + m9 + m10;
print(m);

Buggy submission (verdict: Runtime Error):
import numpy as np

num = int(input());
int count=1;

for i in range(num):
  s = input();
  if len(s) == 1:
    mylist_1.append(s);
  elif len(s) == 2:
    mylist_2.append(s);
  elif len(s) == 3:
    mylist_3.append(s);
  elif len(s) == 4:
    mylist_4.append(s);
  elif len(s) == 5:
    mylist_5.append(s);
  elif len(s) == 6:
    mylist_6.append(s);
  elif len(s) == 7:
    mylist_7.append(s);
  elif len(s) == 8:
    mylist_8.append(s);
  elif len(s) == 9:
    mylist_9.append(s);
  elif len(s) == 10:
    mylist_10.append(s);
    

m1 = len(list(set(mylist_1)));
m2 = len(list(set(mylist_2)));
m3 = len(list(set(mylist_3)));
m4 = len(list(set(mylist_4)));  
m5 = len(list(set(mylist_5)));
m6 = len(list(set(mylist_6)));
m7 = len(list(set(mylist_7)));
m8 = len(list(set(mylist_8)));
m9 = len(list(set(mylist_9)));
m10 = len(list(set(mylist_10)));

m = m1 +m2 +m3 +m4 +m5 + m6 + m7+ m8+ m9+m10;
print(m);
Problem p02701 (python)

Fixed submission:
list1 =[]
number = int(input())
for i in range(0,number):    
    numbers = input()
    list1.append(numbers)
setOfMarks=set(list1)
print(len(setOfMarks))

Buggy submission (verdict: Runtime Error):
#include <iostream>
#include <unordered_set> 
#include <vector>
#include <algorithm>

using namespace std;
int main() {
	    int a;
	    cin>>a;
	    unordered_set<string> s;
	    while(a--){
	        string  str;
	        cin>>str;
	        string key=str;
	        	if (!(s.find(key) != s.end())){
	        	    s.insert(str); 
	        	}
	    }
	    cout<< s.size()<<endl;
	return 0;
}

Buggy submission (verdict: Runtime Error):
#include <iostream>

#include <unordered_set> 
#include <vector>
#include <algorithm>

using namespace std;


int main() {
	    int a,b;
	    cin>>a;
	    std::unordered_set<string> s;
	    
	    while(a--){
	        string str;
	        cin>>str;
	        string key=str;
	        	if (!(s.find(key) != s.end())){
	        	    s.insert(str); 
	        	}
	    }
	    cout<< s.size()<<endl;
	return 0;
}

Buggy submission (verdict: Runtime Error):
#include <iostream>

#include <vector>
#include <algorithm>

using namespace std;


int main() {
	    int a,b;
	    cin>>a;vector<string> colour;
	    
	    while(a--){
	        string str;
	        cin>>str;
	        string key=str;
	        	if (!(std::find(colour.begin(), colour.end(), key) != colour.end())){
	        	    colour.push_back(str); 
	        	}
	    }
	    cout<< colour.size()<<endl;
	return 0;
}
Problem p02699 (python)

Fixed submission:
a = input().split()
s = int(a[0])
w = int(a[1])
if s <= w:
  print('unsafe')
else:
  print('safe')

Buggy submission (verdict: Runtime Error):
s = int(input())
w = int(input())
if s <= w:
  print('unsafe')
else:
  print('safe')

Buggy submission (verdict: Runtime Error):
s = int(input())
w = int(input())
if s <= w:
  print('unsafe')
elif:
  print('safe')
Problem p02711 (python)

Fixed submission:
a = str(input())
if '7' in a:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a = str(input())
if '7' in a:
  print('Yes')
else:
  print('No)

Buggy submission (verdict: Runtime Error):
a = int(input())
l = list(str(a))
for s in l:
  if s == '7':
    print('Yes')
    break
  else if l[2] != '7':
    print('No')

Buggy submission (verdict: Runtime Error):
a = int(input())
l = list(str(a))
for s in l:
  if s === '7':
    print('Yes')
    break
  else if l[2] != '7':
    print('No')

Buggy submission (verdict: Runtime Error):
a = str(input())
l = list(a)
for s in l:
  if s === '7':
    print('Yes')
    break
  else if l[2] != '7':
    print('No')

Buggy submission (verdict: Runtime Error):
a=list(str(input()))
l=[0,1,2]
for i in a:
  for j in l:
    if i == '7':
      print('Yes')
      break
    else if l == 2:
      print('No')

Buggy submission (verdict: Runtime Error):
a=str(input())
l1 = [1,2,3]
for i in a:
  for j in l1:
  	if i == '7':
      print('Yes')
        break
    else if l1 == 3:
      print('No')

Buggy submission (verdict: Runtime Error):
a=input()
if a in 7:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a=int(input())
if a in 7:
  print('Yes')
else:
  print('No')
Problem p02712 (python)

Fixed submission:
a = int(input())
total = 0
for i in range(1, a+1):
  if i % 5 != 0 and i % 3 != 0:
    total += i

print(total)

Buggy submission (verdict: Runtime Error):
a = int(input())
total = 0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
  else:
    continue
print(total)

Buggy submission (verdict: Runtime Error):
a = int(input())
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
print(total)

Buggy submission (verdict: Runtime Error):
a = int(input())
total=0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
print(total)

Buggy submission (verdict: Runtime Error):
a=input()
total=0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
 
	print(total)

Buggy submission (verdict: Runtime Error):
a=input()
total=0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a

print(total)

Buggy submission (verdict: Runtime Error):
a=input()
total=0
for i in range(1, a):
  if i %5 != 0 and i %3 != 0:
    total += a
print(total)
Problem p02829 (python)

Fixed submission:
a=int(input())
b=int(input())
if a!=3 and b!=3:
  print(3)
elif a!=2 and b!=2:
  print(2)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a!=3 and b!=3:
  print('3')
elif a!=2 and b!=2:
  print('2')
else:
  print('1')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=0
if a!=3 and b!=3:
  c=3
elif a!=2 and b!=2:
  c=2
else:
  c=1

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=0
if a!=3 and b!=3:
  c=3
  print(c)
elif a!=2 and b!=2:
  c=2
  print(c)
else:
  c=1
  print(c)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a!=3 and b!=3:
	c=3
    print(c)
elif a!=2 and b!=2:
	c=2
    print(c)
else:
	c=1
    print(c)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a!=3 and b!=3:
	c=3
elif a!=2 and b!=2:
	c=2
else:
	c=1
print(c)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a!=3 and b!=3:
  c=3
elif a!=2 and b!=2:
  c=2
else:
  c=1
finally:
  print(c)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=0
if a!=3 and b!=3:
	c=3
elif a!=2 and b!=2:
	c=2
else:
	c=1
finally:
  	print(c)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a!=3 and b!=3:
	c=3
elif a!=2 and b!=2:
	c=2
else:
	c=1
print(c)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a!=3 and b!=3:
	print(3)
elif a!=2 and b!=2:
	print(2)
else:
	print(1)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=1
d=2
e=3
if a!=3 and b!=3:
	print(e)
elif a!=2 and b!=2:
	print(d)
else:
	print(c)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a!=3 and b!=3:
  print(3)
elif a!=2 and b!=2:
  print(2)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if(a!=3 and b!=3):
  print(3)
elif(a!=2 and b!=2):
  print(2)
else:
  print(1)
Problem p02699 (python)

Fixed submission:
S, W = map(int, input().split())
if S <= W:
  print('unsafe')
else:
  print('safe')

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
while a > 0 and c > 0:
  c -= b
  a -= d
if c <= 0:
  print('Yes')
else:
  print('No')
Problem p02831 (python)

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

from fractions import gcd

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

res = lcm(A, B)

print(res)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

import math

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

res = lcm(A, B)

print(res)
Problem p02693 (python)

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

Buggy submission (verdict: Runtime Error):
k = int(input())
a, b = map(int, input().split())
judge = 0
for i in range(b-a+1):
    if a+i % k = 0:
        judge = 1
if judge == 1:
    print("OK")
else:
    print("NG")
Problem p02711 (python)

Fixed submission:
n=int(input())
if n // 100 == 7:
    print('Yes')
elif (n // 10) % 10 == 7:
    print('Yes')
elif n % 10 == 7:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n=input();
if n // 100 = 7:
    print('Yes')
elif n // 10 = 7:
    print('Yes')
elif n % 10 = 7:
    print('Yes')
else:
    print('No')
Problem p02879 (python)

Fixed submission:
a,b= map(int,input().split())
if a > 9 or b > 9:
  print(-1)
else:
  print(str(a*b))

Buggy submission (verdict: Runtime Error):
a,b= int(input().split())
if a > 9 or b > 9:
  print(-1)
else:
  print(str(a*b))