Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
K=int(input())

x=7%K
#modlist=[]
modlist={i:0 for i in range(K) }
i=1
flag=0
while(modlist[x]==0):
  if x==0:
    print(i)
    flag=1
    break
  #modlist.append(x)
  modlist[x]==1
  x=(10*x+7)%K
  #if i==99983:
    #print(x)
  i+=1


if flag==0:
  print(-1)

Fixed submission:
K=int(input())

x=7%K
i=1
flag=0
for j in range(K+1):
  if x==0:
    print(i)
    flag=1
    break
  x=(10*x+7)%K
  i+=1


if flag==0:
  print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
K=int(input())

x=7%K
modlist=[]
i=1
flag=0
while(x not in modlist):
  if x==0:
    print(i)
    flag=1
    break
  modlist.append(x)
  x=(10*x+7)%K
  i+=1

if flag==0:
  print(-1)

Fixed submission:
K=int(input())

x=7%K
i=1
flag=0
for j in range(K+1):
  if x==0:
    print(i)
    flag=1
    break
  x=(10*x+7)%K
  i+=1


if flag==0:
  print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
K=int(input())

x=7%K
modlist=[]
i=1
flag=0
while(x not in modlist):
  if x==0:
    print(i)
    flag=1
    break
  modlist.append(x)
  x=(10*x+7)%K
  i+=1

if flag==0:
  print(-1)

Fixed submission:
K=int(input())

x=7%K
i=1
flag=0
for j in range(K+1):
  if x==0:
    print(i)
    flag=1
    break
  x=(10*x+7)%K
  i+=1


if flag==0:
  print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())

for i in range(1,N+1):
  n_max=math.ceil(math.sqrt(i))
  n_min=math.floor(math.sqrt(i/6))
  res=0

  for x in range(n_min,n_max+1):
    for y in range(1,x+1):
      for z in range(1,y+1):
        if x*x+y*y+z*z+x*y+y*z+z*x==i:
          if x==y and y==z:
            res+=1
          elif x==y or y==z:
            res+=3
          else:
            res+=6
  print(res)

Fixed submission:
import math
N=int(input())


n_max=math.ceil(math.sqrt(N))
res=[0]*(N+1)

for x in range(1,n_max+1):
  for y in range(1,n_max+1):
    for z in range(1,n_max+1):
      v=x*x+y*y+z*z+x*y+y*z+z*x
      if v <= N:
        res[v]+=1

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

Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())

for i in range(1,N+1):
  n_max=math.ceil(math.sqrt(i))
  res=0
  for x in range(1,n_max+1):
    for y in range(1,n_max+1):
      for z in range(1,n_max+1):
        if x*x+y*y+z*z+x*y+y*z+z*x==i:
          res+=1
  print(res)

Fixed submission:
import math
N=int(input())


n_max=math.ceil(math.sqrt(N))
res=[0]*(N+1)

for x in range(1,n_max+1):
  for y in range(1,n_max+1):
    for z in range(1,n_max+1):
      v=x*x+y*y+z*z+x*y+y*z+z*x
      if v <= N:
        res[v]+=1

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

Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())

for i in range(1,N+1):
  n=math.ceil(math.sqrt(N))
  res=0
  for x in range(1,n+1):
    for y in range(1,n+1):
      for z in range(1,n+1):
        if x*x+y*y+z*z+x*y+y*z+z*x==i:
          res+=1
  print(res)

Fixed submission:
import math
N=int(input())


n_max=math.ceil(math.sqrt(N))
res=[0]*(N+1)

for x in range(1,n_max+1):
  for y in range(1,n_max+1):
    for z in range(1,n_max+1):
      v=x*x+y*y+z*z+x*y+y*z+z*x
      if v <= N:
        res[v]+=1

for i in range(1,N+1):
  print(res[i])
Buggy python submission (verdict: Runtime Error):
S=input()
 
acgt_list=[]
for i in range(len(S)):
  for j in range(i+1,len(S)+1):
    slen=len(S[i:j])
    temp=0
    for s in S[i:j] :
      if s=='A' or s=='C' or s=='G' or s== 'T':
        temp+=1      
    if temp==slen:
      acgt_list.append(slen)
      
print(max(acgt_list))

Fixed submission:
S=input()
 
acgt_list=[0]
for i in range(len(S)):
  for j in range(i+1,len(S)+1):
    slen=len(S[i:j])
    temp=0
    for s in S[i:j] :
      if s=='A' or s=='C' or s=='G' or s== 'T':
        temp+=1      
    if temp==slen:
      acgt_list.append(slen)
      
print(max(acgt_list))

Buggy python submission (verdict: Runtime Error):
S=input()

actg_list=[]
for i in range(len(S)):
  for j in range(i+1,len(S)+1):
    slen=len(S[i:j])
    temp=0
    for s in S[i:j] :
      if s=='A' or s=='C' or s=='G' or s== 'T':
        temp+=1      
    if temp==slen:
      atcg_list.append(slen)
      
print(max(atcg_list))

Fixed submission:
S=input()
 
acgt_list=[0]
for i in range(len(S)):
  for j in range(i+1,len(S)+1):
    slen=len(S[i:j])
    temp=0
    for s in S[i:j] :
      if s=='A' or s=='C' or s=='G' or s== 'T':
        temp+=1      
    if temp==slen:
      acgt_list.append(slen)
      
print(max(acgt_list))
Buggy python submission (verdict: Runtime Error):
N=int(input())

ans=0
odd=[]
for i in range(1,N+1):
  if i%2!=0:
    odd.append(i)
    
if N  <104:
  pass
elif N=105:
  ans=1
else:
  ans=1
  for i in range(106,N+1):
    if i%2 !=0:
      tmp=0
      for j in odd:
        if i%j==0:
          tmp=+1
      if tmp==8:
        ans+=1
        
        
print(ans)

Fixed submission:
N=int(input())
 
ans=0
odd=[]
for i in range(1,N+1):
  if i%2!=0:
    odd.append(i)
    
if N  <104:
  pass
else:
  for i in range(105,N+1):
    if i%2!=0:
      tmp=0
      for j in odd:
        if i%j==0:
          tmp+=1
      if tmp==8:
        ans+=1 
print(ans)
Buggy python submission (verdict: Runtime Error):
from math import min
s = input()
st = input()
mx=10**5

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)

Fixed submission:
def matcher(s1,s2):
    match=0
    for i in range(len(s1)):
        if(s1[i]!=s2[i]):
            match+=1
            
    return match

#print(matcher("eforces","atcoder"))

s = input()
st = input()
mx=10**5

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)

Buggy python submission (verdict: Runtime Error):
s = input()
st = input()
mx=10**5

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)

Fixed submission:
def matcher(s1,s2):
    match=0
    for i in range(len(s1)):
        if(s1[i]!=s2[i]):
            match+=1
            
    return match

#print(matcher("eforces","atcoder"))

s = input()
st = input()
mx=10**5

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)

Buggy python submission (verdict: Runtime Error):
s = input()
st = input()
mx=10**9

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)

Fixed submission:
def matcher(s1,s2):
    match=0
    for i in range(len(s1)):
        if(s1[i]!=s2[i]):
            match+=1
            
    return match

#print(matcher("eforces","atcoder"))

s = input()
st = input()
mx=10**5

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)

Buggy python submission (verdict: Runtime Error):
s = input()
st = input()
mx=10**9

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)

Fixed submission:
def matcher(s1,s2):
    match=0
    for i in range(len(s1)):
        if(s1[i]!=s2[i]):
            match+=1
            
    return match

#print(matcher("eforces","atcoder"))

s = input()
st = input()
mx=10**5

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)

Buggy python submission (verdict: Runtime Error):
s = input()
st = input()
mx=10**9

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st+i)], st))
    
     
print(mx)

Fixed submission:
def matcher(s1,s2):
    match=0
    for i in range(len(s1)):
        if(s1[i]!=s2[i]):
            match+=1
            
    return match

#print(matcher("eforces","atcoder"))

s = input()
st = input()
mx=10**5

rangeforloop= len(s)+1 - len(st)
 
for i in range(rangeforloop):
    mx=min(mx,matcher(s[i:len(st)+i], st))
    
     
print(mx)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int,input().split())) 
ans=0
for i in range(n):
    for j in range(i+1,n):
        ans += l[i]*l[j]
        
print(ans%(10**9 + 7))

Fixed submission:
n = int(input())
l = list(map(int,input().split())) 

totalsqr = (sum(l))**2

individualsqrsum=0
for i in l:
    individualsqrsum += i**2

ans = (totalsqr  - individualsqrsum)  // 2 
ans = ans%(10**9 + 7)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int,input().split()))
ans=[]
k=0
for i in range(0,n):
  for j in range(0,n):
    if(i != j and l[i] %l[j] ==0):
      k=0
      break
    else:k=1
  
  if(k==1):ans.append(i)
    
print(len(set(ans)))
     

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
l.sort();

ans = [0]*(l[n-1]+1)
p=0

while(p<n):
     
    for i in range(l[p],l[n-1]+1,l[p]):
        ans[i]+=1
    p+=1
   
    

c=0
#print(ans)
for i in l:
    if(ans[i]==1):
        c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
a,v = map(int,input().split())
b,w = a,v = map(int,input().split())
t = int(input())
flg = 0
for i in range(t):
  a+=v
  b+=w
  if(a==b):
    flg=1
    break
    
if(flg==1):print("YES")
else:print("NO")

Fixed submission:
a,v = map(int,input().split())
b,w  = map(int,input().split())
t = int(input())

if (abs(a-b) - (v-w)*t <= 0):
    print("YES")
    
else:print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int,input().split()))

mul = 1
for i in l:
    mul *= i
    
if(mul>10**18):print(-1)
else:print(mul)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))

if( 0 in l):print(0)
else:
    
    mul = 1
    for i in l:
        mul *= i
        if(mul>=10**18):break
        
    if(mul>10**18):print(-1)
    else:print(mul)
Buggy python submission (verdict: Runtime Error):
x=int(input())

a=100
k=0
while(1):
  k+=1
  a=a+a(1//100)
  if(a>=x):break
print(k)

Fixed submission:
x=int(input())

a=100
k=0
y=0
for i in range(10**18):
  y=y+1
  
  k = a//100
  a=a+k
  
  if(a>=x):break

print(y)
Buggy python submission (verdict: Runtime Error):
a,b,c=int(input().split())
t=a
b=t
a=b
t2=a
c=t2
a=c
print(a,b,c)

Fixed submission:
a,b,c=map(int,input().split())
t1=0
t2=0
t3=0
t4=0
t1=t1+a
t2=t2+b
b=t1
a=t2

t3=t3+a
t4=t4+c
a=t4
c=t3
print(a,b,c)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
def temp(n,k):
    if(n>=k):
        if(n % k ==0):
            return 0
        else:
            return(temp(n%k,k))
        
    else:
        if(k%n == 0):return n
        else:
            return (min(n,k%n))
print(temp(n,k))


Fixed submission:
n,k=map(int,input().split())
def temp(n,k):
    if(n>=k):
        if(n % k ==0):
            return 0
        else :
            return(min(n%k,k-(n%k)))
        
    else:
        return (min(n,k-n))
print(temp(n,k))
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
if(n+m>=2):
  if(n==1 or n==0):
    print(m*(m-1)/2)
  else if(m==1 or m==0):
    print(n*(n-1)/2)
    
  else:
    print((n*(n-1)/2)+(m*(m-1)/2))

Fixed submission:
n,m=map(int,input().split())
if(n+m>=2 and n>=0 and n<=100 and m<=100 and m>=0):
    ans=int(round(n*(n-1)/2)+(m*(m-1)/2))
    print(ans)
Buggy python submission (verdict: Runtime Error):
N=int(input())

if(N%9==) print("Yes")
else print("No")

Fixed submission:
N=int(input())

if N%9==0:
  print("Yes")

else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import numpy as np
a=input()
b=input()
c=str(a)+str(b)
s=int(c)
m=np.sqrt(s)
if m*m==s:
  print("Yes")
else:
  print("No")
  
  

Fixed submission:
import math
a,b=input().split()

ss=str(a)+str(b)
num=int(ss)
n=math.sqrt(num)

if (int(n)*int(n)==num):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import math
import time
import numpy as np

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

k = int(input())


a = prime_factorize(k)

def nana(n):
    for i in range(1,100000):
        na = int("7"*i)
        if na % n ==0:
            return i

if k %2 == 0:
    print(-1)
else:
    t = []
    for e in a:
        t.append(nana(e))
    print(np.gcd.reduce(t))


Fixed submission:
import sys
input = sys.stdin.readline
import math
import time
import numpy as np

k = int(input())

if k %2 ==0 or k%5==0:
    print(-1)
else:
    if k %7 == 0:
        l = k*9//7
    else:
        l = k*9
    q = 10%l
    for i in range(1,1000000):
        if q ==1:
            print(i)
            break
        else:
            q = (q*10)%l
            pass

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import math
import time
import numpy as np

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

k = int(input())

a = prime_factorize(k)

def nana(n):
    for i in range(1,100000):
        na = int("7"*i)
        if na % n ==0:
            return i

t = []
for e in a:
    t.append(nana(e))
print(np.gcd.reduce(t))


Fixed submission:
import sys
input = sys.stdin.readline
import math
import time
import numpy as np

k = int(input())

if k %2 ==0 or k%5==0:
    print(-1)
else:
    if k %7 == 0:
        l = k*9//7
    else:
        l = k*9
    q = 10%l
    for i in range(1,1000000):
        if q ==1:
            print(i)
            break
        else:
            q = (q*10)%l
            pass
Buggy python submission (verdict: Runtime Error):

import numpy as np


def nextL(A, D):
    L = D
    i = 1
    for a in A:
        line = np.ones(a*2+1, dtype =int)
        L[i-1, n+i-a:n+i+a+1] = line
        i+=1
    L = L[:, n+1:2*n+1]
    Na = np.sum(L, axis=0)
    return Na


n, k = map(int, input().split())

A = [int(a) for a in input().split()]

D = np.zeros((n, 3*n+2), dtype =int)

if k >= 50:
    print((str(n)+" ")*n)
else:
    for i in range(k):
        Na = nextL(A, D)
        A = Na
    Li=[str(int(a)) for a in A]
    Li=" ".join(Li)
    print(Li)


Fixed submission:
import sys
input = sys.stdin.readline
import numpy as np

s = input()
print(s[:3])
Buggy python submission (verdict: Time Limit Exceeded):
n, k, *A = map(int, open(0).read().split())

#n, k = map(int, input().split())
#A = [int(a) for a in input().split()]
Jump = [None] * n
Jump[0] = 1
next = 0
for i in range(1,n+1):
    to = A[next]
    if to in Jump:
        start = Jump.index(to)
        end = i
        dis = end - start

        roop = (k-start) % dis
        print(Jump[start+roop])
        break

    Jump[i] = to
    next = to-1
    if i ==k:
        print(to)
        break


Fixed submission:
n, k = map(int, input().split())
A = [int(a) for a in input().split()]
Jump = [None] * n
Jump[0] = 1
Rireki = [-1] * (n+1)
Rireki[0] = 0
next = 0
for i in range(1,n+1):
    to = A[next]

    if Rireki[to] >= 0:
        start = Jump.index(to)
        end = i
        dis = end - start

        roop = (k-start) % dis
        print(Jump[start+roop])
        break
    Rireki[to] = i
    Jump[i] = to
    next = to-1
    if i ==k:
        print(to)
        break

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
A = [int(a) for a in input().split()]
Jump = [None] * n
Jump[0] = 1
next = 0
for i in range(1,n+1):
    to = A[next]
    if to in Jump:
        start = Jump.index(to)
        end = i
        dis = end - start

        roop = (k-start) % dis
        print(Jump[start+roop])
        break

    Jump[i] = to
    next = to-1
    if i ==k:
        print(to)
        break


Fixed submission:
n, k = map(int, input().split())
A = [int(a) for a in input().split()]
Jump = [None] * n
Jump[0] = 1
Rireki = [-1] * (n+1)
Rireki[0] = 0
next = 0
for i in range(1,n+1):
    to = A[next]

    if Rireki[to] >= 0:
        start = Jump.index(to)
        end = i
        dis = end - start

        roop = (k-start) % dis
        print(Jump[start+roop])
        break
    Rireki[to] = i
    Jump[i] = to
    next = to-1
    if i ==k:
        print(to)
        break

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

import sys
input = sys.stdin.readline

n,k = map(int, input().split())

A = [int(a) for a in input().split()]

Jump = [None] * (n)
Jump[0] = 1
next = 0
for i in range(n):
    to = A[next]
    if to in Jump:
        start = Jump.index(to)
        end = i
        dis = end - start + 1

        roop = (k-start) % dis +1
        if roop == 0:
            print(Jump[end])
            break
        else:
            print(Jump[start+roop-1])
            break

    else:
        Jump[i+1] = to
        next = to-1
    if i ==k-1:
        print(to)
        break


Fixed submission:
n, k = map(int, input().split())
A = [int(a) for a in input().split()]
Jump = [None] * n
Jump[0] = 1
Rireki = [-1] * (n+1)
Rireki[0] = 0
next = 0
for i in range(1,n+1):
    to = A[next]

    if Rireki[to] >= 0:
        start = Jump.index(to)
        end = i
        dis = end - start

        roop = (k-start) % dis
        print(Jump[start+roop])
        break
    Rireki[to] = i
    Jump[i] = to
    next = to-1
    if i ==k:
        print(to)
        break
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
import numpy as np

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

T_Height = [int(h) for h in input().split()]

Roads = [[0] * n for _ in range(n)]

for i in range(m):
    a, b = map(int, input().split())
    Roads[a-1][b-1] = T_Height[b-1]
    Roads[b-1][a-1] = T_Height[a-1]


i = 0
ans = 0
for E in Roads:
    if T_Height[i] > max(E):
        ans += 1
    i+=1

print(ans)


Fixed submission:
import sys
input = sys.stdin.readline
import numpy as np

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

T_Height = [int(h) for h in input().split()]

Roads = [0] * n

for i in range(m):
    a, b = map(int, input().split())
    b_h = T_Height[b-1]
    a_h = T_Height[a-1]
    if b_h > Roads[a-1]:
        Roads[a-1] = b_h
    if a_h > Roads[b-1]:
        Roads[b-1] = a_h


i = 0
ans = 0
for e in Roads:
    if T_Height[i] > e:
        ans += 1
    i+=1

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np
import time



"""
def make_table_min(n, m):
    Table = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    c = 10
    for i in range(n):
        rem = np.random.randint(1,m+1)
        Table.remove(rem)
    return Table

"""

def make_table(n, m):
    Table = [None]*n
    for i in range(n):
        rem = np.random.randint(1,m+1)
        Table[i] = rem
    return Table

t0 = time.time()
n, m, q = map(int, input().split())
Lis = [[int(e) for e in input().split()] for _ in range(q)]

Sum_cor = []
for i in range(10000000000):
    if m >=6:
        Table = make_table(n,m)
    else:
        Table = make_table(n,m)
    Table.sort()
    d_sum = 0
    for l in Lis:
        if Table[l[1]-1]-Table[l[0]-1] == l[2]:
            d_sum+=l[3]
    Sum_cor.append(d_sum)
    t1 = time.time()
    if t1-t0 >1.8:
        print(max(Sum_cor))
        break


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


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


#f_table = [a*t//b for t in range(b)]

if c >= b:
    print((a * (b-1)) // b)

else:
    x = c
    c_amari = c%b
    c_sho = c//b
    ans =(a * c_amari) //b
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline


a, b, c= map(int, input().split())
t_7 = 2/7

f_table = [a*t//b for t in range(b)]

if c >= b:
    print(f_table[-1])

else:
    x = c
    c_amari = c%b
    c_sho = c//b
    ans =f_table[c_amari]
    print(ans)


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


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


#f_table = [a*t//b for t in range(b)]

if c >= b:
    print((a * (b-1)) // b)

else:
    x = c
    c_amari = c%b
    c_sho = c//b
    ans =(a * c_amari) //b
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

n = int(input())

Li = [None]*n
for i in range(n):
    s = input()
    if s in Li:
        pass
    else:
        Li[i] = s

Li = [e for e in Li if e is not None]
print(len(Li))


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

n = int(input())

Li = [input() for _ in range(n)]
Li.sort()
s= Li[0]
c =1
for l in Li[1:]:
    if l == s:
        pass
    else:
        c+=1
        s = l
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

n = int(input())

Li = []
for i in range(n):
    s = input()
    if s in Li:
        pass
    else:
        Li.append(s)

print(len(Li))


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

n = int(input())

Li = [input() for _ in range(n)]
Li.sort()
s= Li[0]
c =1
for l in Li[1:]:
    if l == s:
        pass
    else:
        c+=1
        s = l
print(c)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np

def print_sub(A, Ones):
  A = np.array(A)
  Ones = np.array([1]*(n-1))
  A = A -Ones
  print(n-1 -len(np.nonzero(A)[0]))
  return print_sub(A, Ones)

n= int(input())
A = [int(a) for a in input().split()]

print_sub(A, Ones)
    
print("0")


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

import math

p = math.pi

r = int(input())
print(r*2*p)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np
x, y, a, b, c = map(int, input().split())
P = [0]*x + [int(p) for p in input().split()]
Q = [0]*y + [int(q) for q in input().split()]
R = [int(r) for r in input().split()]

P.sort()
Q.sort()
R.sort(reverse=True)
Px = P[a:]
Qy = Q[b:]
R = R[:x+y]
pc, qc = 0, 0
pqpq = [Px, Qy]
pqc = [pc, qc]
for r in R:
    if Px[pqc[0]]<Qy[pqc[1]]:
        pq = 0
    else:
        pq = 1
    if pqpq[pq][pqc[pq]] < r:
        pqpq[pq][pqc[pq]] = r
        pqc[pq]+= 1
    else:
        break

print(sum(Px)+sum(Qy))


Fixed submission:
import sys
input = sys.stdin.readline
import numpy as np
x, y, a, b, c = map(int, input().split())
P = [0]*x + [int(p) for p in input().split()]
Q = [0]*y + [int(q) for q in input().split()]
R = [int(r) for r in input().split()]

P.sort()
Q.sort()
R.sort(reverse=True)
Px = P[a:]
Qy = Q[b:]
R = R[:x+y]
pc, qc = 0, 0
pqpq = [Px, Qy]
pqc = [pc, qc]
pqctop=[x, y]
for r in R:
    if pqc[0] == x:
        pq = 1
    elif pqc[1] == y:
        pq = 0
    else:
        if Px[pqc[0]]<Qy[pqc[1]]:
            pq = 0
        else:
            pq = 1
    if pqpq[pq][pqc[pq]] < r:
        pqpq[pq][pqc[pq]] = r
        pqc[pq]+= 1
    else:
        break

print(sum(Px)+sum(Qy))
Buggy python submission (verdict: Runtime Error):
s = input()
if len(s) %2 !=0:
  print("No")
else:
  c =0
  for i in range(len(s)//2):
    hi = s[2*i:2*i+2]
    if hi == "hi":
      pass
    else:
      c = 1:
      break
  if c ==0:
    print("Yes")
    
  else:
    print("No")

Fixed submission:
s = input()
if len(s) %2 !=0:
  print("No")
else:
  c =0
  for i in range(len(s)//2):
    hi = s[2*i:2*i+2]
    if hi == "hi":
      pass
    else:
      c = 1
      break
  if c ==0:
    print("Yes")
    
  else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a, b, m = map(int, input().split())
A = [int(ae) for ae in input().split()]
B = [int(be) for be in input().split()]

amin = min(A)
bmin = min(B)
smin = amin + bmin

for i in range(m):
  x, y, c= map(int, input().split())
  th = smin -c
  apmin = A[x]
  if apmin > th:
    pass
  else:
    bpmin = B[y]
    spmin = apmin + bpmin -c
    if spmin < smin:
      smin = spmin
    else:
      pass
print(smin)


Fixed submission:
a, b, m = map(int, input().split())
A = [int(ae) for ae in input().split()]
B = [int(be) for be in input().split()]

amin = min(A)
bmin = min(B)
smin = amin + bmin

for i in range(m):
  x, y, c= map(int, input().split())
  th = smin + c
  apmin = A[x-1]
  if apmin > th:
    pass
  else:
    bpmin = B[y-1]
    spmin = apmin + bpmin -c
    if spmin < smin:
      smin = spmin
    else:
      pass
print(smin)