TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
# B - Battle
A,B,C,D = map(int,input().split())
ans = ['No', 'Yes']
takahashi = (C-1)//B + 1
aoki = (A-1)//D + 1
print(ans[takahashi>=aoki])

# B - Battle
A,B,C,D = map(int,input().split())
ans = ['No', 'Yes']
takahashi = (C-1)//B + 1
aoki = (A-1)//D + 1
print(ans[takahashi<=aoki])

Verdicts: Wrong Answer

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
def main():
    A, B, C, D = map(int, input().split())
    while True:
        C -= B
        if C <= 0:
            print("No")
            return 0
        A -= D
        if A <= 0:
            print("Yes")
            return 0

    return 0

if __name__ == '__main__':
    main()

def main():
    A, B, C, D = map(int, input().split())
    while True:
        C -= B
        if C <= 0:
            print("Yes")
            return 0
        A -= D
        if A <= 0:
            print("No")
            return 0

    return 0

if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
a, b, c, d = map(int,input().split())


if (-(-c // b)) <= (-(-a // d):
    print('Yes')
else:
    print('No')


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


if -(-c // b) >= -(-a // d):
    print('Yes')
else:
    print('No')


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


if (-(-c // b)) >= (-(-a // d):
    print('Yes')
else:
    print('No')


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


if -(-c // b) <= -(-a // d):
    print('Yes')
else:
    print('No')


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
a, b, c, d = map(int, input().split())
while True:
    if (c - b) <= 0:
        print("Yes")
        exit()
    else:
        c = c - d
        if a - d <= 0:
            print("No")
            exit()
        else:
            a = a - 

a, b, c, d = map(int, input().split())
while True:
    if (c - b) <= 0:
        print("Yes")
        exit()
    else:
        c = c - b
        if a - d <= 0:
            print("No")
            exit()
        else:
            a = a - d



Verdicts: Runtime Error

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
A,B,C,D = map(int,input().split())
#N=int(input())
#A = list(map(int,input().split()))
#S=str(input())
flag=True
while flag==True:
    C-=B
    if C<0:
        print('Yes')
        exit()
    A-=D
    if A<0:
        print('No')
        exit()


A,B,C,D = map(int,input().split())
#N=int(input())
#A = list(map(int,input().split()))
#S=str(input())
flag=True
while C>0 and A>0:
    C-=B
    if C<=0:
        print('Yes')
        exit()

    A-=D
    if A<=0:
        print('No')
        exit()


Verdicts: Wrong Answer

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
a,b,c,d=map(int,input().split())
if (a//d+1)>(c//b+1):
    print('No')
else:
    print('Yes')

import sys
a,b,c,d=map(int,input().split())
e=max(a//d+1,c//b+1)
for i in range(2*(e+1)):
    if i%2!=0:
        a-=d
        if a<=0:
            print('No')
            sys.exit()
    else:
        c-=b
        if c<=0:
            print('Yes')
            sys.exit()

Verdicts: Wrong Answer

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
A, B, C, D = map(int, input().split())

i, j = 0, 0

while A > 0:
    A -= D
    i += 1

while C > 0:
    C -= B
    j += 1

if i <= j:
    print('Yes')
else:
    print('No')

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

while A > 0 and C > 0:
    if Flag == 1:
        C -= B
        Flag = 2
    else:
        A -= D
        Flag = 1

if Flag == 2:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
a, b, c, d = map(int, input().split())

while (a >= 0 or c >= 0):
    a -= d
    c -= b
    print(a, c)
    if (a <= 0):
        print('No')
        quit()
    if (c <= 0):
        print('Yes')
        quit()

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

while (a >= 0 or c >= 0):
    a -= d
    c -= b
    if (c <= 0):
        print('Yes')
        quit()
    if (a <= 0):
        print('No')
        quit()

Verdicts: Wrong Answer

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):

HPlist = list(map(int, input().split()))
HPlist[0] = A
HPlist[1] = B
HPlist[2] = C
HPlist[3] = D



if C % B == 0:
    aokiDeath = C // B
else:
    aokiDeath = C // B + 1 


if A % D == 0:
    takahashiDeath = A // D
else:
    takahashiDeath = A // D + 1

if aokiDeath <= takahashiDeath:
    print("Yes")
else:
    print("No")


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


int takahashi = A
int aoki = C
int aokiDeath
int takahashiDeath


if C % B == 0:
    aokiDeath = C // B
else:
    aokiDeath = C // B + 1 


if A % D == 0:
    takahashiDeath = A // D
else:
    takahashiDeath = A // D + 1

if aokiDeath <= takahashiDeath:
    print("Yes")
else:
    print("No")



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



if C % B == 0:
    aokiDeath = C // B
else:
    aokiDeath = C // B + 1 


if A % D == 0:
    takahashiDeath = A // D
else:
    takahashiDeath = A // D + 1

if aokiDeath <= takahashiDeath:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi and Aoki will have a battle using their monsters.  The health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respectively.  The two monsters will take turns attacking, in the order Takahashi's, Aoki's, Takahashi's, Aoki's, ... Here, an attack decreases the opponent's health by the value equal to the attacker's strength. The monsters keep attacking until the health of one monster becomes 0 or below. The person with the monster whose health becomes 0 or below loses, and the other person wins.  If Takahashi will win, print `Yes`; if he will lose, print `No`.

Submission attempts (in order):
A, B, C, D = map(int, input().split())
print('yes' if A // D < C // B else 'no')

A, B, C, D = map(int, input().split())
print('yes' if A+B > C + D else 'no')

a, b, c, d = map(int, input().split())
while 1:
    a -= d
    c -= b
    if a <= 0:
        print('no')
        break
    else:
        print('yes')
        break

A, B, C, D = map(int, input().split())
print('yes' if A - D > C - B else 'no')

a, b, c, d = map(int, input().split())
while a > 0 and c > 0:
    c -= b
    if c <= 0:
        break
    a -= d
print('Yes' if c <= 0 else 'No')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
#coding UTF-8
from collections import Counter
n= int(input())
l=[input()for i in range(n)] 
c=cCounter(l)

print(len(c))

#coding UTF-8
from collections import Counter
n= int(input())
l=[input()for i in range(n)] 
c=Counter(l)

print(len(c))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import collections

N=int(input())
P=[input() for i in range(N)]
print(P)
c=collections.Counter(P)
print(len(c))

import collections

N=int(input())
P=[input() for i in range(N)]
c=collections.Counter(P)
print(len(c))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import collections
n = int(input())
s = [input() for i in range(n)]
c = collections.Counter(s)
print(len(a))

import collections
n = int(input())
s = [input() for i in range(n)]
c = collections.Counter(s)
print(len(c))


Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N=int(input())
S=[]
count=0
for i in range(N):
    sample=input()
    S.append(sample)

set(S)

    
    
print(len(S))

N=int(input())
S=[]
count=0
for i in range(N):
    sample=input()
    S.append(sample)



    
    
print(len(set(S)))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
c = []
cou = 1
for i in range(n):
  c.append(input())

set(c)
  
print(len(c))

n = int(input())
c = []
for i in range(n):
  c.append(input())

print(len(list(set(c))))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = input()
a = []
for i in range(N):
  f = input()
  a.append(f)
  
a=list(set(a))

print(len(a))

N = int(input())
a = []
for i in range(N):
  f = input()
  a.append(f)
  
a=list(set(a))

print(len(a))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())

Ws = [s for _ in range(N)]

print(len(set(Ws)))

N = int(input())
 
Ws = [input() for _ in range(N)]
 
print(len(set(Ws)))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
sequence = [input() for _ in range(n)]
ans = 0
while True:
    if len(sequence) == 0:
        break
    a = sequence[0]
    sequence.remove(a)
    ans += 1


print(ans) 

n = int(input())
sequence = [input() for _ in range(n)]

print(len(set(sequence))) 

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())
r = set()
for i in range(N):
    r |= set(input())

print(len(r))

N = int(input())
r = set()
for i in range(N):
    r |= set([input()])

print(len(r))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
ans = []
cnt = 0
for i in range(n):
    s = input()
    ans.append(s)
ans.sort()
for i in range(n-1):
    if ans[i]!=ans[i+1]:
        cnt+=1
print(cnt)

n = int(input())
ans = []
cnt = 1
for i in range(n):
    s = input()
    ans.append(s)
ans.sort()
for i in range(n-1):
    if ans[i]!=ans[i+1]:
        cnt+=1
print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N=int(input())
for i in range(N):
  S[i+1]=str(input())
print(len(set(S)))

N=int(input())
a=[]
for i in range(N):
  a.append(input())
print(len(set(a)))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input()) 
s = [input() for i in range(N)] 
print(len(s))

N = int(input()) 
s = [input() for i in range(N)] 
print(len(set(s)))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n=input()
s=set()
print(len(s))

n=int(input())
s=[int(input()) for i in range(n)]
print(len(set(s))

n=int(input())
s={input() for i in range(n)}
print(len(s))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
items = [x for x in input().split()]

print(len(set(items)))

n = int(input())
items = [input() for _ in range(n)]

print(len(list(set(items)))

n = int(input())
items = [input() for _ in range(n)]

print(len(list(set(items))))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())
set = {}
for i in range(N):
    A = str(input())
    set.add(A)

print(len(set))


N = int(input())
s = set()
for i in range(N):
    A = str(input())
    s.add(A)

print(len(s))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
s_list = []
for i in range(n):
    temp = input()
    s_list.append(temp)

len(set(s_list))

n = int(input())
s_list = []
for i in range(n):
    temp = input()
    s_list.append(temp)

print(len(set(s_list)))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n= int(input())
kk=set()
for i in range(n):
  s=input()
  kk.add()
print(len(kk))

n= int(input())
kk=set()
for i in range(n):
  s=input()
  kk.add(s)
print(len(kk))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(raw_input())
s = set()
for _ in range(N):
    S = raw_input()
    s.add(S)
print(len(s))

N = int(input())
s = set()
for _ in range(N):
    S = input()
    s.add(S)
print(len(s))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import math

def main():
    n = input()
    s = {}
    print(n)
    while int(n)>0:
        m = input()
        if m in s:
            s[m]+=1
        else:
            s[m]=1
        n = int(n) - 1
    print(len(s))
    return 0

main()

import math

def main():
    n = input()
    s = {}
    while int(n)>0:
        m = input()
        if m in s:
            s[m]+=1
        else:
            s[m]=1
        n = int(n) - 1
    print(len(s))
    return 0

main()

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = set(S)
len(set_S)


N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = list(set(S))
len(set_S)


N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = list(set(S))
print(len(set_S))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    s = [input() for i in range(n)]
    print(len(s))
    return 0

if __name__ == '__main__':
    solve()

import math
import collections
import fractions
import itertools
 
def solve():
    n = int(input())
    s = [input() for i in range(n)]
    print(len(set(s)))
    return 0
 
if __name__ == '__main__':
    solve()

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    # S = []
    
    #     str = input()
    #     if str not in S:
    #         S.append(str)
    #
    # print(len(S))

    S = {}
    val=0
    for i in range(N):
        str = input()
        if S.get(str) == None:
            S[val]=str
            val+=1

    print(val)

    # val = 0
    # str = ""
    
    #     in_str = input()
    #     if str.find(in_str):
    #         str += " "+in_str
    #         val += 1
    #
    # print(val)

if __name__ == '__main__':
    main()


import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    # S = []
    
    #     str = input()
    #     if str not in S:
    #         S.append(str)
    #
    # print(len(S))

    val = 0
    str = ""
    for i in range(N):
        in_str = input()
        if str.find(in_str):
            str += " "+in_str
            val += 1

    print(val)

if __name__ == '__main__':
    main()


import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    # S = []
    
    #     str = input()
    #     if str not in S:
    #         S.append(str)
    #
    # print(len(S))

    S = set()
    for i in range(N):
        S.add(input())

    print(len(S))

    # S = {}
    # val=0
    
    #     str = input()
    #     if S.get(str) == None:
    #         S[val]=str
    #         val+=1
    #
    # print(val)

    # val = 0
    # str = ""
    
    #     in_str = input()
    #     if str.find(in_str):
    #         str += " "+in_str
    #         val += 1
    #
    # print(val)

if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
#include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    vector<string> S(N);
    for(int i=0;i<N;i++) {
        cin >> S.at(i);
    }
    sort(S.begin(),S.end());
    S.erase(unique(S.begin(),S.end()),S.end());
    cout << (int)S.size() << endl;
}

N = int(input())
S = []
for i in range(N) :
    S.append(input())

print(len(set(S)))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import sys 
input = sys.stdin.readline
for tt in range(1):
	n = int(input())
	s = set()
	for i in range(n):
		if i==n-1:
			s.add(input().lower())
		else:
			s.add(input().lower()[:-1])
	print(len(s))
			

import sys 
try:
	sys.stdin = open('input.txt', 'r') 
	sys.stdout = open('output.txt', 'w')
except:
	pass
# input = sys.stdin.readline
for tt in range(1):
	n = int(input())
	s = set()
	for i in range(n):
		s.add(input())
	print(len(s))
			

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
list = []
for i in range(n):
  i = str(input())
  ilen = len(i)
  list.append(ilen)
  
kind = len(list)
print(kind)

n = int(input())
lis = set()
for i in range(n):
  i = str(input())
  ilen = len(i)
  lis.append(ilen)
  
kind = int(len(lis))
print(kind)


n = int(input())
lis = {}
for i in range(n):
  i = str(input())
  ilen = len(i)
  lis.append(ilen)
  
kind = int(len(lis))
print(kind)


n = int(input())
lis = []
for i in range(n):
  i = str(input())
  ilen = len(i)
  lis.append(ilen)
  
kind = int(len(lis))
print(kind)


n = int(input())
lis = set()
for i in range(n):
  i = str(input())
  lis.add(i)
  
kind = int(len(lis))
print(kind)


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
a = input().strip()
l = a.split()

m_l = set()
for i in range(1 , n + 1):
    m_l.add(l[i])
print(len(m_l))


b = input().strip()
a = b.split()
a.pop(0)
print(len(set(a)))


a = p.strip()
l = a.split()
m = l.pop(0)
print(len(set(l))


a = input().strip()
l = a.split()
n = int(l[0])
m_l = set()
for i in range(1 , n + 1):
    m_l.add(l[i])
print(len(set(m_l)))


p = input()
a = p.strip()
l = a.split()
print(len(set(l)) - 1)



a = input().strip()
l = a.split()
n = int(l[0])
m_l = []
for i in range(1 , n + 1):
    m_l.append(l[i])
print(len(list(set(m_l))))


a = p.strip()
l = a.split()
m = l.pop(0)
print(len(set(l)))


a = input().strip()
l = a.split()
print(len(set(l)) - 1)


p = input()
a = p.strip()
l = a.split()
m = l.pop(0)
print(len(set(l))



a = int(input())
l = [input() for i in range(a)]
print(len(set(l)))


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
s = []
for _ in range(n):
    s.append(input())

print(s)

print(len(set(s)))

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

print(len(set(s)))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import math

I = int(input())

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

#N = input()

#listA = list(N)

#list = list(map(int, input().split()))

list = '\n'.join(iter(input, ''))
print(len(set(list)))

import math

I = int(input())

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

#N = input()

#listA = list(N)

#list = list(map(int, input().split()))

list = '\n'.join(iter(input, ''))
print(len(set(list))-1)

import math

I = int(input())

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

#N = input()

#listA = list(N)

#list = list(map(int, input().split()))

list = [input() for i in range(I)]
print(len(set(list)))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
b=int(input())
a=set(input().split())
print(len(a))

b=int(input())
l = {input() for _ in range(b)}
print(len(l))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
#include "bits/stdc++.h"
using namespace std;

int main(){
    int N;
    cin >> N;
    string S[N];
    for(int i=0;i<N;i++) cin >> S[i];
    int count = 0;
    for(int i=0;i<N;i++){
        if(S[i]!="0"){
            for(int j=i+1;j<N;j++){
                if(S[i]==S[j]) S[j]="0";
            }
        }
    }
    for(int i=0;i<N;i++){
        if(S[i]!="0") count++;
    }
    cout << count << endl;

}


a,b,c,d=map(int,input().split())
while True:
	c-=b
	if c<=0:
		print("Yes")
		break
	a-=d
	if a<=0:
		print("No")
		break


N = int(input())
S = list()
for i in range(N):
  S.append(input())
S1 = set(S)
print(len(S1))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n=int(input())
a=[]
for _ in range(n):
  a.append(input())
as=set(a)
print(len(a))

n=int(input())
a=[]
for _ in range(n):
  a.append(input())
as=set(a)
print(len(as))

n=int(input())
a=[]
for _ in range(n):
  a.append(input())
as_=set(a)
print(len(as_))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
l =[]
for i in range(0,n):
  l.append(input())
print(len(set(l))
  

n = int(input())
l =[]
for i in range(0,n):
  l.append(str(input()))
print(len(set(l)))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())
S = [ [],[],[],[],[],[],[],[],[],[] ]
ans = 0
for i in range(N):
  temps = input()
  if(temps not in S[len(temps)-1]):
    ans += 1
    S[len(temps)-1].append(temps)
print(ans)
print(S)

N = int(input())
d = {}
for i in range(N):
  d[input()] = 1
print(len(d))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n=int(input())
g=[]
for i in range(n):
  gi=input()
  g.append(gi)  
g.sort()
count=1
for i in range(n-1):
  if g[i]!=g[i+1]:
    count+=1
print(g)
print(count)

n=int(input())
g=[]
for i in range(n):
  gi=input()
  g.append(gi)  
g.sort()
count=1
for i in range(n-1):
  if g[i]!=g[i+1]:
    count+=1

print(count)


Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n= input()
s=[]
for i in range(n):
  s.append(input())
  
print(set(s))


n= int(input())
s=[]
for i in range(n):
  s.append(int(input()))
  
print(set(s))

n= int(input())
s=[]
for i in range(n):
  s.append(input())
  
print(len(set(s)))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
S = input()
N = len(S)
print(N)
cnt = 0

for i in range(N):
    for j in range(i+4, N+1):
        if int(S[i:j]) % 2019 == 0:
            cnt += 1
print(cnt)



N = int(input())
S = [input() for _ in range(N)]

s = len(set(S))
print(s)

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n= int(input())
l= {}
for _ in range(n):
	s= input()
	l.add(s)
print(len(l))

n= int(input())
l= set()
for _ in range(n):
	s= input()
	l.add(s)
print(len(l))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import itertools
s = input()
s_li = list(s)
lee = len(s_li)

count = 0
keta = list(itertools.combinations([i for i in range(lee)], 2))
for k in keta:
    lk = list(k)
    #print(s_li[lk[0]:lk[1]+1])
    if int(''.join(s_li[lk[0]:lk[1]+1]))%2019 == 0:
        count += 1
print(count)

n = int(input())
li = []
for _ in range(n):
    li.append(input())
print(len(set(li)))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import collections
N = int(input())
S = [str(input()) for i in range(N)]
a = collections.Counter(S)
print(len(S))


import collections
N = int(input())
S = [str(input()) for i in range(N)]
a = collections.Counter(S)
print(len(a))


Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
s = set()
for _ in range(int(input())):
    s.add(input())
print(*s,'\n',len(s))

s = set()
for _ in range(int(input())):
    s.add(input())
print(len(s))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
from collections import defaultdict

def solve():
    N = int(input())
    A = [input() for _ in range(N)]
    d = defaultdict(int)
    
    for a in A:
        d[a] += 1
    
    return len(d)

# print(solve())


solve()

from collections import defaultdict

def solve():
    N = int(input())
    A = [input() for _ in range(N)]
    d = defaultdict(int)
    
    for a in A:
        d[a] += 1
    
    return len(d)

print(solve())


#solve()


Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
Row = int(input())
List = list(input() for i in range(Row))
sorted(List)
a=Row-1
while a>0:
 if List[a] == List[a-1]:
  List.remove(List[a])
  a-=1
 else:a-=1
else:print(len(List))  

Row = int(input())
List = list(input() for i in range(Row))
sorted(List)
a=Row-1
while a>0:
 if List[a] == List[a-1]:
  List.remove(List[a])
  a-=1
 else:a-=1
else:print(len(List))  

Row = int(input())
List = list(input() for i in range(Row))
print(len(set(List)))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
Row = int(input())
List = []
for i in range (Row):
  List.append(int(input()))
s_l = set(List)
print(len(s_l))

Row = int(input())
List = []
for i in range (Row):
  List.append(input())
s_l = set(List)
print(len(s_l))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
s = []
for i in range(n):
  s.append(input())
s.sort()
print(len(s))

n = int(input())
s = []
for i in range(n):
  s.append(input())
print(len(set(s)))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
s = [input() for i in range(n)]
print(list(set(s)).length)



n = int(input())   
x = [input() for i in range(n)]
print(len(list(set(x))))



Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
s = []
for _ in range(input()):
  s.append(input())
print(len(set(s)))

n = int(input())
s = []
for _ in range(n):
  s.append(input())
print(len(set(s)))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import collections

n = int(input())
a = [list(input() for i in range(n))]
b = collections.Counter(a)
print(len(b))


import collections

n = int(input())
a = [input() for i in range(n)]
b = collections.Counter(a)
print(len(b))


Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
import collections
n = int(input())
for i in range(n):
    a = int(input())
  b=collections.Counter(a)
  print(len(b))


from collections import Counter
n = int(input())
s = [input() for i in range(n)]
c = Counter(s)
c = list(s.items())
print(len(c))

from collections import Counter
n = int(input())
s = [input() for i in range(n)]
c = Counter(s)
c = list(c.items())
print(len(c))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
s = [input() for _ in range(n)]

print(n, s)

items = []

for i in range(n):
    new = True
    for j in range(len(items)):
        if s[i] == items[j]:
            new = False
    if new:
        items.append(s[i])
    
print(len(items))


N = int(input())
S = [input() for _ in range(N)]

print(len(set(S)))


Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
# -*- coding: utf-8 -*-

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

n = max([int(a / d) + 1, int (c / b) + 1])

for i in range(n):
    a -= d
    c -= b
    # print(a,c)
    if c <= 0:
        print('Yes')
        exit()
    elif a <= 0:
        print('No')
        exit()

# -*- coding: utf-8 -*-

n = int(input())

kind = []

for i in range(n):
    kind.append(input())

print(len(set(kind)))


Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())
st = set()
for _ in range(N):
  S = input()
  st.insert(S)

print(len(st))

N = int(input())
st = set()
for _ in range(N):
  S = input()
  st.add(S)

print(len(st))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
S = input()
count = 0
for i in range(len(S)):
  if int(S[i]) <= 1:
    for j in range(i+1,i+7):
      if int(S[i:j]) % 2019 == 0 and int(S[i:j]) != 0:
        count = count + 1
        if j >= len(S):
          break
  if int(S[i]) >= 2:
    if int(S[i:i+6]) == 200000:
      for j in range(i+1,i+7):
        if int(S[i:j]) % 2019 == 0 and int(S[i:j]) != 0:
          count = count + 1
          if j >= len(S):
            break
    else:
      for j in range(i+1,i+6):
        if int(S[i:j]) % 2019 == 0 and int(S[i:j]) != 0:
          count = count + 1
          if j >= len(S):
            break
print(count)

N = int(input())
S = [input() for _ in range(N)]
S.sort()
cnt = 1
for i in range(1,N):
  if S[i] != S[i-1]:
    cnt+=1
print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())

import sys
S = set(sys.stdin.buffer.readlines())

print(len(S))

n = int(input())

import sys
S = set(sys.stdin.readlines())



print(len(S))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())
n_list = []
for i in range(N):
    n_list.append(input())
print(len(dict(Counter(n_list))))

from collections import Counter
N = int(input())
n_list = []
for i in range(N):
    n_list.append(input())
print(len(dict(Counter(n_list))))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())
S = [str(input()) for _ in range(N)]

S = list(S)

for i in range(N):
    for j in range(N-1):
        if S[i] == S[j+1]:
            N = N - 1

print(N)

import collections

num = int(input())
S = [str(input()) for _ in range(num)]

print(len(collections.Counter(S)))

Verdicts: Wrong Answer

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n=int(input())
l=[]
for i in range(n):
  print(i)
  l.append(input())
print(len(s))

n=int(input())
l=[]
for i in range(n):
  l.append(input())
s=set(l)
print(len(s))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n=int(input())
s=[int(input()) for i in range(n)]
S=list(set(s))
print(len(S))

n=int(input())
s=[input() for i in range(n)]
S=list(set(s))
print(len(S))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
l= []
s = {}

for i in range(n):
  a = input()
  l.append(a)
 
s = set(l)
print(len(s)

n = int(input())

l= []
for i in range(n):
    a  = input()
    l.append(a)
s = set(l)
print(len(s))


Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
N = int(input())
S = [input() for i in range(N)]
return len(set(S))

N = int(input())
S = [input() for i in range(N)]
print(len(set(S)))

Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
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);

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);


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);


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input())
ls = []
for _ in n:
  ls.append(input())
  
 print(len(set(ls)))


n = int(input())
ls = []
for _ in n:
  ls.append(input())
  
 print(len(set(ls))

n = int(input())
ls = []
for _ in range(n):
  ls.append(input())
  
print(len(set(ls)))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n = int(input)
lis = [input() for i in range(n)]
print(len(set(lis)))


n = int(input())
lis = [input() for i in range(n)]
print(len(set(lis)))


Verdicts: Runtime Error

Accepted
Problem: You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.  How many kinds of items did you get?

Submission attempts (in order):
n=int(input())
dic=[]
for i in range(n):
  if not i in dic:
    dic.append(i)
print(len(dic))

n=int(input())
s = list(set([input() for i in range(n)]))
print(len(s))

Verdicts: Wrong Answer

Accepted