TnT/CodeNet4Repair huggingface dataset:
Problem:
Snuke prepared 6 problems for a upcoming programming contest. For each of those problems, Rng judged whether it can be used in the contest or not.  You are given a string S of length 6. If the i-th character of s is `1`, it means that the i-th problem prepared by Snuke is accepted to be used; `0` means that the problem is not accepted.  How many problems prepared by Snuke are accepted to be used in the contest?

Incorrect submission (verdict: Wrong Answer):
input().count("1")

Fixed, accepted submission:
print(input().count("1"))
Problem:
It is November 18 now in Japan. By the way, 11 and 18 are adjacent Lucas numbers.  You are given an integer N. Find the N-th Lucas number.  Here, the i-th Lucas number L_i is defined as follows:    * L_0=2   * L_1=1   * L_i=L_{i-1}+L_{i-2} (i≥2)

Incorrect submission (verdict: Wrong Answer):
n = int(input())

L = [2,1]
for i in range(2,n):
  k = L[i-2]+L[i-1]
  L.append(k)
  
print(L[len(L)-1])

Fixed, accepted submission:
n = int(input())

L = [2,1]
for i in range(2,n+1):
  k = L[i-2]+L[i-1]
  L.append(k)
  
print(L[len(L)-1])
Problem:
You are given a string S consisting of `0` and `1`. Find the maximum integer K not greater than |S| such that we can turn all the characters of S into `0` by repeating the following operation some number of times.    * Choose a contiguous segment [l,r] in S whose length is at least K (that is, r-l+1\geq K must be satisfied). For each integer i such that l\leq i\leq r, do the following: if S_i is `0`, replace it with `1`; if S_i is `1`, replace it with `0`.

Incorrect submission (verdict: Wrong Answer):
s=input()
n=len(s)
ans=10**18
for i in range(n-1):
  if s[i+1]!=s[i]:
    ans=min(ans,max(i,n-i-1))
print(ans)

Fixed, accepted submission:
s=input()
n=len(s)
ans=n
for i in range(n-1):
  if s[i+1]!=s[i]:   
    ans=min(ans,max(i+1,n-i-1))
print(ans)
Problem:
Let's first write a program to calculate the score from a pair of input and output. You can know the total score by submitting your solution, or an official program to calculate a score is often provided for local evaluation as in this contest. Nevertheless, writing a score calculator by yourself is still useful to check your understanding of the problem specification. Moreover, the source code of the score calculator can often be reused for solving the problem or debugging your solution. So it is worthwhile to write a score calculator unless it is very complicated.

Incorrect submission (verdict: Wrong Answer):
d = int(input())
c = list(map(int, input().split(' ')))
 
s = [list(map(int, input().split(' '))) for _ in range(d)]
 
t = [int(input()) - 1 for _ in range(d)]
ca = [0] * 26 
dc = 0 
dl = [] 
 
for i in range(1, d + 1):
    dc += s[i - 1][t[i - 1]]
    ca[t[i - 1]] = i
    dc -= sum([c[i2] * (i - ca[i2]) for i2 in range(26)])
    dl.append(dc)

Fixed, accepted submission:
d = int(input())
c = list(map(int, input().split(' ')))

s = [list(map(int, input().split(' '))) for _ in range(d)]

t = [int(input()) - 1 for _ in range(d)]
ca = [0] * 26 
dc = 0 
dl = [] 

for i in range(1, d + 1):
    dc += s[i - 1][t[i - 1]]
    ca[t[i - 1]] = i
    dc -= sum([c[i2] * (i - ca[i2]) for i2 in range(26)])
    dl.append(dc)
print('\n'.join(list(map(str, dl))))
Problem:
Write a program of the Insertion Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the following pseudocode:                 for i = 1 to A.length-1     key = A[i]     /* insert A[i] into the sorted sequence A[0,...,j-1] */     j = i - 1     while j >= 0 and A[j] > key         A[j+1] = A[j]         j--     A[j+1] = key   Note that, indices for array elements are based on 0-origin.  To illustrate the algorithms, your program should trace intermediate result for each step.

Incorrect submission (verdict: Wrong Answer):
# ??\?????????
N = int(input())
list = input().split()

# ?????\?????????
for i in range(1,len(list)):
    v = list[i]
    j = i - 1
    while j >=0 and list[j] > v:
        list[j+1] = list[j]
        j -= 1
    list[j+1] = v
    print(list)

Fixed, accepted submission:
def insertionSort(n, A):
    for i in range(n):
        t = A[i]
        j = i - 1
        while (j >= 0) and (A[j] > t):
            A[j + 1] = A[j]
            j -= 1
        A[j + 1] = t
        print(*A)
    return A


if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))
    insertionSort(N, A)
Problem:
We have a sequence of length N, a = (a_1, a_2, ..., a_N). Each a_i is a positive integer.  Snuke's objective is to permute the element in a so that the following condition is satisfied:    * For each 1 ≤ i ≤ N - 1, the product of a_i and a_{i + 1} is a multiple of 4.  Determine whether Snuke can achieve his objective.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))


def prime_factor(n):
    ass = []
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.append(i)
            n = n//i
    if n != 1:
        ass.append(n)
    return ass
for i in range(n):
    a[i] = min(2, prime_factor(a[i]).count(2))

two = a.count(2)
one = a.count(1)
zero = a.count(0)
if two >= n // 2:
    print("YES")
else:
    if n - two * 2 == one:
        print("YES")
    else:
        print("NO")


Fixed, accepted submission:
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    if a[i] % 4 == 0:
        a[i] = 2
    elif a[i] % 2 == 0:
        a[i] = 1
    else:
        a[i] = 0

two = a.count(2)
one = a.count(1)
zero = a.count(0)
if two >= n // 2:
    print("Yes")
else:
    if n - two * 2 == one:
        print("Yes")
    else:
        print("No")
Problem:
There is a cave.  The cave has N rooms and M passages. The rooms are numbered 1 to N, and the passages are numbered 1 to M. Passage i connects Room A_i and Room B_i bidirectionally. One can travel between any two rooms by traversing passages. Room 1 is a special room with an entrance from the outside.  It is dark in the cave, so we have decided to place a signpost in each room except Room 1. The signpost in each room will point to one of the rooms directly connected to that room with a passage.  Since it is dangerous in the cave, our objective is to satisfy the condition below for each room except Room 1.    * If you start in that room and repeatedly move to the room indicated by the signpost in the room you are in, you will reach Room 1 after traversing the minimum number of passages possible.  Determine whether there is a way to place signposts satisfying our objective, and print one such way if it exists.

Incorrect submission (verdict: Wrong Answer):
N, M = map(int, input().split())
G =[[]for i in range(N)]
for _ in range(M):
    A,B = map(int,input().split())
    G[A-1].append(B-1)
    G[B-1].append(A-1)
print(G)
if len(G[0])==0:
    print('No')
else:
    print('Yee')
    for i in range(1,N):
        print(min(G[i])+1)

Fixed, accepted submission:
from collections import deque
N, M = map(int, input().split())
G = [[] for i in range(N)]
for _ in range(M):
    A, B = map(int, input().split())
    G[A-1].append(B-1)
    G[B-1].append(A-1)

T = [-1]*N
que = deque()
que.append(0)
while que:
    v = que.popleft()
    for e in G[v]:
        if T[e] == -1:
            T[e] = v+1
            que.append(e)
print("Yes")
print(*T[1:], sep="\n")
Problem:
Iroha has a sequence of N strings S_1, S_2, ..., S_N. The length of each string is L.  She will concatenate all of the strings in some order, to produce a long string.  Among all strings that she can produce in this way, find the lexicographically smallest one.  Here, a string s=s_1s_2s_3...s_n is _lexicographically smaller_ than another string t=t_1t_2t_3...t_m if and only if one of the following holds:    * There exists an index i(1≦i≦min(n,m)), such that s_j = t_j for all indices j(1≦j<i), and s_i<t_i.   * s_i = t_i for all integers i(1≦i≦min(n,m)), and n<m.

Incorrect submission (verdict: Wrong Answer):
s=input().split()
s.sort()
print(''.join(s))

Fixed, accepted submission:
[n,l]=[int(_) for _ in input().split()]
s=[]
for i in range(n):
  s.append(input())
s.sort()
print(''.join(s))
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
a = sorted(list(map(int, input().split())))

if a == [5, 5, 7]:
    print("Yes")
else:
    print("No")


Fixed, accepted submission:
a, b, c = map(int, input().split())
if (a, b, c) in [(5, 5, 7), (5, 7, 5), (7, 5, 5)]:
    print('YES')
else:
    print('NO')
Problem:
AtCoder Mart sells 1000000 of each of the six items below:    * Riceballs, priced at 100 yen (the currency of Japan) each   * Sandwiches, priced at 101 yen each   * Cookies, priced at 102 yen each   * Cakes, priced at 103 yen each   * Candies, priced at 104 yen each   * Computers, priced at 105 yen each  Takahashi wants to buy some of them that cost exactly X yen in total. Determine whether this is possible.   (Ignore consumption tax.)

Incorrect submission (verdict: Wrong Answer):
x = int(input())
for i in range(100000):
  if i * 100 <= x <= i *105:
    print(1)
print(0)

Fixed, accepted submission:
x = int(input())
for i in range(100000):
  if i * 100 <= x <= i *105:
    print(1)
    exit()
print(0)
Problem:
Write a program which reads an integer $S$ [second] and converts it to $h:m:s$ where $h$, $m$, $s$ denote hours, minutes (less than 60) and seconds (less than 60) respectively.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
if (n < 60):
    h = 0
    m = 0
    s = n
else:
    s = n % 60
    h = n // 3600
    m = n - (h * 3600) - s
print('{}:{}:{}'.format(h, m, s))

Fixed, accepted submission:
n = int(input())
if (n < 60):
    h = 0
    m = 0
    s = n
else:
    s = n % 60
    h = n // 3600
    m = (n - (h * 3600) - s) / 60
print('{}:{:.0f}:{}'.format(h, m, s))
Problem:
You are given a string S consisting of lowercase English letters. We will write down this string, starting a new line after every w letters. Print the string obtained by concatenating the letters at the beginnings of these lines from top to bottom.

Incorrect submission (verdict: Wrong Answer):
S = input()
w = int(input())
s = ''
for i in range(len(S)//w):
    s += S[w * i]
print(s)

Fixed, accepted submission:
S = str(input())
w = int(input())
s = ''
if len(S)%w == 0: 
    for i in range(len(S)//w):
        s += S[w * i]
else:
    for i in range(len(S)//w+1):
        s += S[w * i]
        
print(s)
Problem:
A professor invented Cookie Breeding Machine for his students who like cookies very much.  When one cookie with the taste of x is put into the machine and a non-negative integer y less than or equal to 127 is input on the machine, it consumes the cookie and generates two cookies with the taste of y and (x XOR y).  Here, XOR represents .  At first, there is only one cookie and the taste of it is D .  Find the maximum value of the sum of the taste of the exactly N cookies generated after the following operation is conducted N-1 times.    1. Put one of the cookies into the machine.    2. Input a non-negative integer less than or equal to 127 on the machine.

Incorrect submission (verdict: Wrong Answer):
from heapq import heappush, heappop
T = int(input())

for i in range(T):
    N, D = map(int, input().split())
    ans = D
    h = []
    heappush(h,D)
    for _ in range(N - 1):
        k = heappop(h)
        z = bin(k)[2:].zfill(7)
        t = int(z,2)
        heappush(h,t)
        ans += (127 + t - k)
    print(ans)



Fixed, accepted submission:
from heapq import heappush, heappop
T = int(input())
A = []
for i in range(T):
    N, D = map(int, input().split())
    ans = D
    h = []
    heappush(h,D)
    for _ in range(N - 1):
        k = heappop(h)
        t = 127 ^ k
        heappush(h,t)
        ans += (127 + t - k)
    A.append(ans)
for i in range(len(A)):
    print(A[i])
Problem:
You are given an integer sequence of length n, a_1, ..., a_n. Let us consider performing the following n operations on an empty sequence b.  The i-th operation is as follows:    1. Append a_i to the end of b.   2. Reverse the order of the elements in b.  Find the sequence b obtained after these n operations.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
ki=a[0::2]
ki2=[]
for i in ki[::-1]:
    ki2.append(i)
guu=a[1::2]
guu2=[]
for i in guu[::-1]:
    guu2.append(i)

if n%2==0:
    kotae=guu2+ki
else:
    kotae=ki2+guu

print(kotae)

Fixed, accepted submission:
n = int(input())
a = list(map(int, input().split()))
ki=a[0::2]
ki2=[]
for i in ki[::-1]:
    ki2.append(i)
guu=a[1::2]
guu2=[]
for i in guu[::-1]:
    guu2.append(i)

if n%2==0:
    kotae=guu2+ki
else:
    kotae=ki2+guu
kotae=" ".join(map(str,kotae))
print(kotae)
Problem:
Takahashi is organizing a party.  At the party, each guest will receive one or more snack pieces.  Takahashi predicts that the number of guests at this party will be A or B.  Find the minimum number of pieces that can be evenly distributed to the guests in both of the cases predicted.  We assume that a piece cannot be divided and distributed to multiple guests.

Incorrect submission (verdict: Wrong Answer):
import fractions
A,B = map(int,input().split())
print(A*B/fractions.gcd(A,B))

Fixed, accepted submission:
import numpy as np
A,B = map(int,input().split())
print(np.lcm(A,B))
Problem:
You are given a string S consisting of digits between `1` and `9`, inclusive. You can insert the letter `+` into some of the positions (possibly none) between two letters in this string. Here, `+` must not occur consecutively after insertion.  All strings that can be obtained in this way can be evaluated as formulas.  Evaluate all possible formulas, and print the sum of the results.

Incorrect submission (verdict: Wrong Answer):
s = input()
n = int(s)
r = 0

for bit in range(2**(len(s)-1)):
    e = s[0]
    for i in range(len(s)-1):
        if ((bit>>i)&1) == 1:
            e += '+'
        e += s[i+1]
        print(e)
    #r += sum(map(int, e.split('+')))
    r+= eval(e)
print(r)


Fixed, accepted submission:

s =input()
n = int(s)
r = 0
p=0
for bit in range(2**(len(s)-1)):
    e = s[0]
    for i in range(len(s)-1):
        if ((bit>>i)&1) == 1:
            e += '+'
        e += s[i+1]
        #print(e)
    r+= sum(map(int, e.split('+')))
    p+= eval(e)
print(r)
Problem:
Find the sum of the integers between 1 and N (inclusive), whose sum of digits written in base 10 is between A and B (inclusive).

Incorrect submission (verdict: Wrong Answer):
n,a,b = map(int,input().split())
ans = 0
for i in range(n+1):
    if a <= sum(list(map(int,list(str(i)))))<= b:
        ans += 1
print(ans)

Fixed, accepted submission:
n,a,b = map(int,input().split())
ans = 0
for i in range(n+1):
    if a <= sum(list(map(int,list(str(i)))))<= b:
        ans += i
print(ans)
Problem:
Write a program which reads three integers, and prints them in ascending order.

Incorrect submission (verdict: Wrong Answer):
x =[int(i) for i in input().split()]

x.sort()
print (x)

Fixed, accepted submission:
x =[int(i) for i in input().split()]

x.sort()

print (x[0] , x[1] , x[2])
Problem:
There are N rectangular plate materials made of special metal called AtCoder Alloy. The dimensions of the i-th material are A_i \times B_i (A_i vertically and B_i horizontally).  Takahashi wants a rectangular plate made of AtCoder Alloy whose dimensions are exactly H \times W. He is trying to obtain such a plate by choosing one of the N materials and cutting it if necessary. When cutting a material, the cuts must be parallel to one of the sides of the material. Also, the materials have fixed directions and cannot be rotated. For example, a 5 \times 3 material cannot be used as a 3 \times 5 plate.  Out of the N materials, how many can produce an H \times W plate if properly cut?

Incorrect submission (verdict: Wrong Answer):
n,h,w = map(int,input().split())
ans = 0
for i in range(n):
    a,b = map(int,input().split())
    if a>=h and w>=b:
        ans+=1
print(ans)

Fixed, accepted submission:
n,h,w = map(int,input().split())
ans = 0
for i in range(n):
    a,b = map(int,input().split())
    if a>=h and w<=b:
        ans+=1
print(ans)
Problem:
We have N sticks with negligible thickness. The length of the i-th stick is A_i.  Snuke wants to select four different sticks from these sticks and form a rectangle (including a square), using the sticks as its sides. Find the maximum possible area of the rectangle.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
aa = list(reversed(list(sorted(a))))

aad = {}
for i in aa:
    if i in aad.keys():
        aad[i] = aad[i] + 1
    else:
        aad.update({i:1})

m4 = 0
p = 0
q = 0
for k ,l in aad.items():
    if l > 3:
        m4 = m4 + l
        del(aad[k])
        break
        
for k ,l in aad.items():
    if l > 1:
        p = p + l
        del(aad[k])
        break

for k ,l in aad.items():
    if l > 1:
        q = q + l
        del(aad[k])
        break
if m4 > 0:
    print(m4 * m4)
else:
    print(p * q)


Fixed, accepted submission:
N = int(input())
A = list(map(int, input().split()))
Adict = {}
for i in A:
    if i in Adict:
        Adict[i]=Adict[i]+1
    else:
        Adict.update({i:1})
B = [0, 0]
for i in Adict.keys():
    if Adict[i] >= 2:
        B.append(i)
    if Adict[i] >= 4:
        B.append(i)
B.sort()
print(B[-1]*B[-2])
Problem:
Takahashi has a deposit of 100 yen (the currency of Japan) in AtCoder Bank.  The bank pays an annual interest rate of 1 % compounded annually. (A fraction of less than one yen is discarded.)  Assuming that nothing other than the interest affects Takahashi's balance, in how many years does the balance reach X yen or above for the first time?

Incorrect submission (verdict: Wrong Answer):
s=int(input())
a=100
b=0
while a<=s:
  a=int(a*(1+0.01))
  b+=1
print(b)

Fixed, accepted submission:
s=int(input())
a=100
b=0
while a<s:
  a=int(a*(1+0.01))
  b+=1
print(b)
Problem:
Snuke has a grid consisting of three squares numbered 1, 2 and 3. In each square, either `0` or `1` is written. The number written in Square i is s_i.  Snuke will place a marble on each square that says `1`. Find the number of squares on which Snuke will place a marble.

Incorrect submission (verdict: Wrong Answer):
s = list(map(int,input().split()))
print(s.count(1))

Fixed, accepted submission:
s = input()
print(s.count("1"))
Problem:
You are given three integers A, B and C. Determine whether C is not less than A and not greater than B.

Incorrect submission (verdict: Wrong Answer):
a, b, c = map(int, input().split())
print("YSes" if a <= c <= b else "No")

Fixed, accepted submission:
a, b, c = map(int, input().split())
print("Yes" if a <= c <= b else "No")
Problem:
You are given two integers A and B. Find the largest value among A+B, A-B and A \times B.

Incorrect submission (verdict: Wrong Answer):
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print(min(A + B, A - B, A * B))

Fixed, accepted submission:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print(max(A + B, A - B, A * B))
Problem:
Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.  The problem has N test cases.  For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is `AC`, `WA`, `TLE`, and `RE`, respectively.  See the Output section for the output format.

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

Fixed, accepted submission:
n=int(input())
ac,wa,tl,re=0,0,0,0
for i in range(n):
  s=input()
  if(s=="AC"):
    ac+=1
  elif(s=="WA"):
    wa+=1
  elif(s=="TLE"):
    tl+=1
  else:
    re+=1
print("AC",'x',ac)
print("WA",'x',wa)
print("TLE",'x',tl)
print("RE",'x',re)
Problem:
In AtCoder Kingdom, Gregorian calendar is used, and dates are written in the "year-month-day" order, or the "month-day" order without the year.   For example, May 3, 2018 is written as 2018-5-3, or 5-3 without the year.  In this country, a date is called _Takahashi_ when the month and the day are equal as numbers. For example, 5-5 is Takahashi.   How many days from 2018-1-1 through 2018-a-b are Takahashi?

Incorrect submission (verdict: Wrong Answer):
A,B=map(int,input().split())
print(A if A>B else A+1)

Fixed, accepted submission:
A,B=map(int,input().split())
print(A-1 if A>B else A)
Problem:
We have N cards. A number a_i is written on the i-th card.   Alice and Bob will play a game using these cards. In this game, Alice and Bob alternately take one card. Alice goes first.   The game ends when all the cards are taken by the two players, and the score of each player is the sum of the numbers written on the cards he/she has taken. When both players take the optimal strategy to maximize their scores, find Alice's score minus Bob's score.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
card_values = list(map(int, input().split(" ")))

card_values_sorted = sorted(card_values, reverse=True)
print(card_values_sorted)

Alice_score = 0
Bob_score = 0
for i in range(N):
    if i%2 == 0:
        Alice_score += card_values_sorted[i]
    else:
        Bob_score += card_values_sorted[i]

print(Alice_score - Bob_score)

Fixed, accepted submission:
N = int(input())
card_values = list(map(int, input().split(" ")))
 
card_values_sorted = sorted(card_values, reverse=True)

Alice_score = 0
Bob_score = 0
for i in range(N):
    if i%2 == 0:
        Alice_score += card_values_sorted[i]
    else:
        Bob_score += card_values_sorted[i]
 
print(Alice_score - Bob_score)
Problem:
The commonly used bills in Japan are 10000-yen, 5000-yen and 1000-yen bills. Below, the word "bill" refers to only these.  According to Aohashi, he received an otoshidama (New Year money gift) envelope from his grandfather that contained N bills for a total of Y yen, but he may be lying. Determine whether such a situation is possible, and if it is, find a possible set of bills contained in the envelope. Assume that his grandfather is rich enough, and the envelope was large enough.

Incorrect submission (verdict: Wrong Answer):

n,y=map(int,input().split())
flag=False
for i in range(2001):
    for j in range(2001):
        if i+j<=n and 1000*i+5000*j+1000*(n-i-j)==y:
            flag=True
            print(i,j,n-i-j)
            break
if not flag:
    print(-1,-1,-1)

Fixed, accepted submission:

n,y=map(int,input().split())
a,b,c=0,0,0
flag=False
for i in range(2001):
    for j in range(2001):
        if i+j<=n and 10000*i+5000*j+1000*(n-i-j)==y:
            a=i
            b=j
            c=n-i-j
            flag=True
            break
if flag:
  print(a,b,c)
if not flag:
    print(-1,-1,-1)
Problem:
AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.  Since he is forgetful, he might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.

Incorrect submission (verdict: Wrong Answer):
l = list(map(int,input().split()))
k = 1
if l[0]==l[1]:
    k+=1
if l[1]==l[2]:
    k+=1
if l[2]==l[0]:
    k+=1
print('{}'.format(k))


Fixed, accepted submission:
l = list(map(int,input().split()))
k=0
if l[0]== l[1]==l[2]:
    k+=1
if l[0]!=l[1]:
    k+=1
if l[1]!=l[2]:
    k+=1
if l[2]!=l[0]:
    k+=1
if k>3:
    k=3
print('{}'.format(k))