Problem:


Score : 100 points

Problem Statement

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.

Constraints

1≦a,b,c≦100

Input

The input is given from Standard Input in the following format:

a b c

Output

Print the number of different kinds of colors of the paint cans.

Sample Input 1

3 1 4

Sample Output 1

3

Three different colors: 1, 3, and 4.

Sample Input 2

3 3 33

Sample Output 2

2

Two different colors: 3 and 33.



Sample input:
3 1 4


Sample output:
3

Submission status: Runtime Error

Solution code:
import math
N = int(input())
def ceil(x,y):
    if x % y == 0:
        return x // y
    else:
        return x // y + 1
t=1
a=1
for i in range(N):
    T , A = [int(i) for i in input().split(' ')]
 #   print(T,A)
    n1 = ceil(t , T)
    n2 = ceil(a , A)
    n = max(n1,n2)
    #while T*n <= t and A*n <= a:
     #   n += 1
    
    t = T*n
    a = A*n
#    print(t,a)

print(t+a)

Submission status: Runtime Error

Solution code:
#!C:\Users\daichi\Anaconda3/python.exe
# -*- coding: utf-8 -*-

C = input().split()
a = C[0]
b = C[1]
c = C[1]

if(a == b and a == c):
    k = 3
if(a == c and a != b):
    k = 2 
if(a != b and c != b):
    k = 1

print(k)

Submission status: Runtime Error

Solution code:
print(len(set(input.split())))

Submission status: Runtime Error

Solution code:
a = [int(i) for i in input().split()] 
sum = 0
if (a[0] == a[1]):
  if (a[0] == a[2]):
  	sum = 1
  else:
    sum = 2
elif (a[0] === a[2]):
  sum = 1
elif (a[1] === a[2]):
  sum = 1
else:
  sum = 0
  
print(sum)

Submission status: Runtime Error

Solution code:
#include <stdio.h>
#include "stdafx.h"

int main() {
	int a, b, c ,dd = 0;
	

	scanf_s("%d %d %d", &a, &b, &c);

	if (a == b)dd++;

	if (a == c)dd++;

	if (b == c)dd++;

	if (dd == 3) dd = 2;

	printf("%d", 3 - dd);
	





	return 0;
}

Submission status: Runtime Error

Solution code:
from math import ceil
N = int(input())
T,A = 1,1
for i in range(N):
    Ti,Ai = map(int,input().split())
    r = max(ceil(T/Ti),ceil(A/Ai))
    T,A = Ti*r,Ai*r
print(T+A)

Submission status: Runtime Error

Solution code:
lis = list(input())
cou = 0
ans = 0
for i in range(len(lis)):
	if lis[i] == "g":
		if cou > 0:
        	cou -= 1
        	ans += 1
		else:
        	cou += 1
	else:
		if cou > 0:
        	cou -= 1
		else:
			cou += 1
			ans -= 1
print(max(0,ans))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if a=b=c :
    print(1)
elif a=b and not b=c:
    print(2)
elif b=c and not a=c :
    print(2)
elif c=a and not a=b :
    print(2)
else :
    print(3)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input())
color = [a]
if b not in color:
  color.append(b)
if c not in color:
  color.append(c)
print(len(color))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input())
color = [a]
if b not in color:
  color.append(b)
if c not in color:
  color.append(c)
print(color)

Submission status: Runtime Error

Solution code:
l = sort(map(int, input().split()))
if l[0] == l[1] == l[2]:
    print('1')
elif l[0] == l[1]:
    print('2')
else:
    print('3')

Submission status: Runtime Error

Solution code:
import sys
nums = [for i in map(int, sys.stdin.readline().split())]
counted = []
cnt = 0
for item in nums:
    if item in counted:
        continue
    else:
        cnt += 1
        counted.append(item)

print(cnt)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print(len(set(a, b, c)))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
if a == b and b== c:
 print("1")
elif a == b:
 print("2")
elif b == c:
 print("2")
elif a==c:
 print("2")
else:
 print("3")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
if a == b and b== c:
 print("1")
elif a == b or b ==c or a == c:
 print("2")
else:
 print("3")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
if a == b == c:
 print("1")
elif a == b or b ==c or a ==c:
 print("2")
else:
 print("3")

Submission status: Runtime Error

Solution code:
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def ris(): return list(input())
def pli(): return "".join(list(map(str, ans)))

print(len(set(rli()))

Submission status: Runtime Error

Solution code:
a = [int(i) for i in input().split()]
if a == b == c :
    print (1)
elif a == b or b == c :
    print (2)
else :
    print (3)

Submission status: Runtime Error

Solution code:
print len(set(input().split()))

Submission status: Runtime Error

Solution code:
l=map(int,raw_input().split())
c=3
for i in l:
    if l.count(i)==3:
        c= 1
        break
    elif l.count(i)==2:
        c= 2
        break
print c
vvvvv

Submission status: Runtime Error

Solution code:
import math

N = int(input())
T = []
A = []
Nb = 0
for i in range(N):
    a, b = map(int,input().split())
    T.append(a)
    A.append(b)
Tn = T[0]
An = A[0]
for i in range(N):
        tmp = math.ceil(max(Tn / T[i], An / A[i]))
        Nb = (T[i] + A[i])*tmp
        Tn = T[i] * tmp
        An = A[i] * tmp
print(Nb)

Submission status: Runtime Error

Solution code:
print(len(set([int(i) in input().split()])))

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
s = set([a, b, c])
print len(s)

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
s = set([a, b, c]]
print len(s)

Submission status: Runtime Error

Solution code:
a,b,c == list(map(int,input().split()))

if a == b == c:
    print(1)
elif a == b or a == c or b == c:
    print(2)
else:
    print(3)

Submission status: Runtime Error

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

if a == b == c:
    print(1)
elif a == b or a == c or b == c:
    print(2)
else:
    print(3)

Submission status: Runtime Error

Solution code:
n = int(input())
t = 1
a = 1
for i in range(n):
    T, A = map(int, input().split())
    k = max(1, ~-t//T + 1, ~-a//A + 1)
    t = k * T
    a = k * A
print(t + a)

Submission status: Runtime Error

Solution code:
#coding:utf-8
N,K=map(int,input().split())
print(K*(K-1)**(N-1))

Submission status: Runtime Error

Solution code:
#coding:utf-8
N,K=list(map(int,input().split()))
print(K*(K-1)**(N-1))

Submission status: Runtime Error

Solution code:
N, K = map(int, raw_input().split())
print ((K-1)**(N-1))*K

Submission status: Runtime Error

Solution code:
import numpy as np
import math
N=input()
T=[]
A=[]
for i in range(N):
    Ti,Ai=map(int,raw_input().split())
    T.append(Ti)
    A.append(Ai)
 
Tn=1
An=1
dp = np.zeros(N)
dp[0] = 1
 
for i in range(1,N):
    dp[i] = math.ceil(max(A[i]/A[i-1],T[i]/T[i-1])*dp[i-1])
 
print (T[-1]+A[-1])*dp[-1]

Submission status: Runtime Error

Solution code:
from sys import setrecursionlimit
from numpy import ceil


def _main():
    setrecursionlimit(1100)
    print int(sum(election(1.0, 1.0, input())))


def election(t_prev, a_prev, n):
    if n == 0:
        return t_prev, a_prev
    t, a = map(int, raw_input().split())

    mlt = max(ceil(t_prev / t), ceil(a_prev / a), 1)
    return election(t * mlt, a * mlt, n - 1)


if __name__ == '__main__':
    _main()

Submission status: Runtime Error

Solution code:
n, k=map(int, input().split())

ans=k*(k-1)**(n-1)

print(ans)

Submission status: Runtime Error

Solution code:
n, k=map(int, input().split())

ans=(k-1)**(n-1)

print(ans*k)

Submission status: Runtime Error

Solution code:

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

ans=(k-1)**(n-1)

print(ans*k)

Submission status: Runtime Error

Solution code:

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

ans=k*(k-1)**(n-1)

print(ans)

Submission status: Runtime Error

Solution code:

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

ans=k*((k-1)**(n-1))

print(ans)

Submission status: Runtime Error

Solution code:

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

ans=k*((k-1)**(n-1))

print(ans)

Submission status: Runtime Error

Solution code:
def penki(n, k):
    return k*(k-1)**(n-1)

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

print(penki(n, k))

Submission status: Runtime Error

Solution code:
シカのAtCoDeerくんはペンキをこれまでに3つ買いました。おととい買ったペンキの色は a , 昨日買ったペンキの色は b , 今日買ったペンキの色は c です。各ペンキの色は1以上100以下の整数で表されます。 AtCoDeerくんはわすれんぼうなため、同じ色のペンキを買ってしまっていることがあります。AtCoDeerくんが買ったペンキの色の種類の個数を教えてあげてください。

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

Submission status: Runtime Error

Solution code:
list = str(input()).split()
if int(list[0]) = int(list[1]):
   if int(list[1]) = int(list[2]):
      print(1)
   else print(2)
elif int(list[0]) = int(list[2]):
   print(2)
elif int(list[1]) = int(list[2]):
   print(2)
else:
   print(3)

Submission status: Runtime Error

Solution code:
item_list = [0]*100
cnt = 0
a = map(int, input().split())
for i in a:
    if not item_list[i]:
        item_list[i] = 1
        cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
from collections import Counter

print(len(Counter([int(input()) for i in range(3)])))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

print k * (k-1) ** (n-1)

Submission status: Runtime Error

Solution code:
print len({map(int, raw_input().split())})

Submission status: Runtime Error

Solution code:
import math
n = int(input())
c_t = 0
c_a = 0
for i in range(n):
    t, a = [int(x) for x in input().split(" ")]
    #print(min(c_t / t, c_a / a))
    init = int(math.floor(max(c_t / t, c_a / a, 1)))
    for j in range(init,10**18):
        if t*j >= c_t and a*j >= c_a:
            c_t = t*j
            c_a = a*j
            #print("->" + str(j))
            break
print(c_t + c_a)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
print(k*(k-1)**(n-1))

Submission status: Runtime Error

Solution code:
#ABC046B

n,k=map(int,raw_input().split())
print k*((k-1)**(n-1))

Submission status: Runtime Error

Solution code:
# coding: utf-8
import math
from decimal import Decimal

N = int(input())

votes = []

for _ in range(N):
    votes.append([Decimal(n) for n in input().split()])

befa = 1
befb = 1

for a, b in votes:
    kakeru = Decimal(max(math.ceil(befa / a), math.ceil(befb / b)))
    befa = a * kakeru
    befb = b * kakeru

print(int(befa)+int(befb))

Submission status: Runtime Error

Solution code:
import math                                             
                                                        
N = input()                                             
t = []                                                  
a = []                                                  
for i in range(int(N)):                                 
    t_n, a_n = input().split()                          
    t.append(int(t_n))                                  
    a.append(int(a_n))                                  
                                                        
t_ans = 0                                               
a_ans = 0                                               
for t_n, a_n in zip(t, a):                              
    k = max(math.ceil(t_ans/t_n), math.ceil(a_ans/a_n)) 
    if not k:                                           
        k = 1                                           
    t_ans = int(k*t_n)                                  
    a_ans = int(k*a_n)                                  
print(t_ans+a_ans)

Submission status: Runtime Error

Solution code:
a = []                
for i in range(3):    
    a.append(input()) 
                      
s = set(a)            
print(len(s))

Submission status: Runtime Error

Solution code:
n, k = map(int, raw_input().split())

Submission status: Runtime Error

Solution code:
n, k = map(int, raw_input().split())
print(k * (k-1)**(n-1))

Submission status: Runtime Error

Solution code:
n, k = map(int, raw_input().split())
print(k * (k-1)**(n-1))

Submission status: Runtime Error

Solution code:
a, b, c = map(int, raw_input())
print(len(set([a,b,c])))

Submission status: Runtime Error

Solution code:
cans = set(map(int, raw_input().split()))
return len(cans)

Submission status: Runtime Error

Solution code:
N = int(raw_input())
t = [[0,0] for i in range(N)]
for i in range(N):
    l = []
    l = raw_input().split()
    t[i][0] = int(l[0])
    t[i][1] = int(l[1])
min_ = [0,0]
min_[0] = t[0][0]
min_[1]= t[0][1]
for i in range(1,N):
    if min_[0] > min_[1]:
        large_index = 0
    else:
        large_index = 1
    cnt = 1
    while cnt*t[i][large_index]<min_[large_index]:
        cnt = cnt+1
    min_[0] = cnt*t[i][0]
    min_[1] = cnt*t[i][1]
print min_[0]+min_[1]

Submission status: Runtime Error

Solution code:
def solve(t,a,tp,ap):

    if t/a == tp/ap:
        return t,a
    
    next_t=0
    next_a=0
    
    num_a = max( int(a/ap)  , int(t/tp) )
    next_t = num_a*tp
    next_a = num_a*ap

    while not(next_t > t and next_a > a):
        next_t += tp
        next_a += ap
    return next_t,next_a


N = int(raw_input())
l = []
for i in range(N):
    l.append( map(float,raw_input().split()) )

t = 1.0
a = 1.0

while len(l):
    tp,ap = l.pop(0)
    t,a = solve(t,a,tp,ap)

print int(t+a)

Submission status: Runtime Error

Solution code:
n,k = map(int, input().split())

print(k * ((k-1) ** (n-1)))

Submission status: Runtime Error

Solution code:
import sys

def input_num():
    num = input().split()
    return num

def num_serch(num):
    penki_num = len(num)
    for j, i in enumerate(num):
        if i == num[j+1]:
            penki_num = penki_num - 1
        if j == penki_num - 1:
            break

    print(penki_num)

if __name__ == '__main__':
    num = input_num()
    num_serch(num)

Submission status: Runtime Error

Solution code:
n = map(int, input().split())
i = 3

if n[0] == n[1] :
    i -= 1

if n[0] == n[2] :
    i -= 1

elif n[1] == n[2] :
    i -= 1

print(i)

Submission status: Runtime Error

Solution code:
result = 0
N, K = map(int, input().split())
if N == 1:
    result = K
else:
    result = K
    for i in range(N-1):
        result = result * (K - 1)
print(result)

Submission status: Runtime Error

Solution code:
a = input().split()
s = {}
for i in a:
    s |= i
print(len(s))

Submission status: Runtime Error

Solution code:
line = input.split()
l = list(map(int, line))
a = l[0]
b = l[1]
c = l[2]

print (a)
print (b)
print (c)

Submission status: Runtime Error

Solution code:
a,b,c = raw_input().split()

A = {a:1,b:1,c:1}
print len(A)

Submission status: Runtime Error

Solution code:
n, k = map(int, raw_input().split())
ans =  k * ((k-1)**(n-1))
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
map_ = {}
map_[a] = 1
map_[b] = 1
map_[c] = 1
print len(map_)

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

int main(void){
	int a,b,c,s=0;
	int[101] arr={};
	cin >> a >> b >> c;
	int[a]=1;
	int[b]=1;
	int[c]=1;
	for(int i=0;i<101;i++){
		s+=arr[i];
	}
	cout << s;
	return 0;
}

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())

map_ = {}
map_[a] = 1
map_[b] = 1
map_[c] = 1

print len(map_)

Submission status: Runtime Error

Solution code:
N, K = [int(i) for i in input().split()]
print(K*((K-1)**(N-1)))

Submission status: Runtime Error

Solution code:
from sys import stdin

a = map((int(x) for x in stdin.readline().split()))

print(len(a))

Submission status: Runtime Error

Solution code:
print(len({input().split()}))