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: Accepted

Solution code:
#coding=UTF-8

mojir=input()
hyo=mojir.split(' ')
penki=set([int(mono) for mono in hyo])

print(len(penki))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b, c = map(int, raw_input().split())
cnt = 3
if a == b:
    cnt-=1
if b == c:
    cnt-=1
if a == c:
    cnt-=1
if cnt==0:
    cnt=1
print cnt

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = 3
a, b, c = map(int, input().split())
if a == b:
    count -= 1
if a == c:
    count -= 1
if b == c:
    count -= 1
if count == 0:
    count += 1
print(count)

Submission status: Accepted

Solution code:
n = input().split(' ')

if n[0] != n[1] != n[2] != n[0]:
    print(3)
elif n[0] == n[1] != n[2] != n[0]:
    print(2)
elif n[0] != n[1] == n[2] != n[0]:
    print(2)
elif n[2] == n[0] != n[1] != n[0]:
    print(2)
else:
    print(1)

Submission status: Accepted

Solution code:
l =  map(int,raw_input().split())
print len(set(l))

Submission status: Accepted

Solution code:
l = raw_input().split()
map_ = {}
for data in l:
    map_[l[0]] = 1
    map_[l[1]] = 1
    map_[l[2]] = 1
print len(map_)

Submission status: Accepted

Solution code:
n = list(map(int, input().split()))
print(len(set(n)))

Submission status: Accepted

Solution code:

from collections import Counter
S = raw_input().strip().split()
print len(Counter(S))

Submission status: Accepted

Solution code:
import re
x = raw_input()
x = re.split(" ", x)
print len(set(x))

Submission status: Accepted

Solution code:
a, b, c = map(int, raw_input().split())
answer = 1
if b != a:
    answer += 1
if c != a and c != b:
    answer += 1
print answer

Submission status: Accepted

Solution code:
import sys

line = sys.stdin.readline()
line = line.rstrip().split(" ")
dic = {}
for i in line:
    dic[i] = 0

print (len(dic))

Submission status: Accepted

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


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


def main(a, b, c):
    return len({a, b, c})


print(main(a, b, c))

Submission status: Accepted

Solution code:
paints = raw_input().split()
paints_uniq = list(set(paints))
print(len(paints_uniq))

Submission status: Accepted

Solution code:
l = input().split()
s = set(l)
print(len(s))

Submission status: Accepted

Solution code:
a=[int(i) for i in input().split()]
c=[]
d=0
for i in range(3):
    if not a[i] in c:
      d+=1
      c.append(a[i])
print(d)

Submission status: Accepted

Solution code:
penki = map(int, raw_input().split(" "))
a = penki[0]
b = penki[1]
c = penki[2]

if a == b and b == c:
	print 1
elif a != b and b != c and c != a:
	print 3
else:
	print 2

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print len(set(raw_input().split(' ')))

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = 3
if a == b:
    k -= 1
if a == c:
    k -= 1
if b == c:
    k -= 1
if k == 0:
    print(1)
else:
    print(k)

Submission status: Accepted

Solution code:



if __name__=='__main__':
    a = list(map(int,input().split()))
    print(len(set(a)))

Submission status: Accepted

Solution code:
d = list(map(int,input().split()))
dico = {}
for i in d:
	if i not in dico:
		dico[i] = 1
	else:
		dico[i] += 1

print(len(dico))

Submission status: Accepted

Solution code:
import re
import doctest


class IO_for_Contest(object):
    @staticmethod
    def my_input():
        # return raw_input()
        return input()

    @staticmethod
    def read_from_input():
        return IO_for_Contest.read_n_int(3)

    @staticmethod
    def read_line():
        return IO_for_Contest.my_input().strip()

    @staticmethod
    def read_int():
        return int(IO_for_Contest.my_input().strip())

    @staticmethod
    def read_n_int(n):
        return list(map(
                    int,
                    re.split('\s+', IO_for_Contest.my_input().strip())))[: n]


def solve():
    buf = IO_for_Contest.read_from_input()
    a = buf[0]
    b = buf[1]
    c = buf[2]

    if a == b and b == c:
        print(1)
        return
    if a == b or b == c or c == a:
        print(2)
        return
    print(3)

if __name__ == '__main__':
    # doctest.testmod()
    solve()

Submission status: Accepted

Solution code:
from sys import stdin

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

print(len(a))

Submission status: Accepted

Solution code:
A = [int(x) for x in raw_input().split()]
d = {}
for x in A:
    d[x] = 1
print len(d.keys())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from random import random
import math
import re
import fractions

A = map(int, raw_input().split(" "))
print len(set(A))

Submission status: Accepted

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

ans = 0

if a == b == c:
    ans = 1

elif a == b or b == c or c == a:
    ans = 2

else:
    ans = 3

print ans

Submission status: Accepted

Solution code:
import bisect
import sys
import math
import itertools
sys.setrecursionlimit(10000)

INF = float('inf')

# input macro
def i():
    return int(raw_input())
def ii():
    return map(int,raw_input().split(" "))
def s():
    return raw_input()
def ss():
    return raw_input().split(" ")
def slist():
    return list(raw_input())
#

def join(s):
    return ''.join(s)

#iterate macro
def piter(n,m):
    return itertools.permutations(n,m)
def citer(n,m):
    return itertools.combinations(n,m)

#modulo macro
def modc(a,b,m):
    c = 1
    for i in xrange(b):
        c = c * (a - i) % m
        c = c * modinv(i + 1,m) % m
    return c
 
def gcd(a, b):
    (x, lastx) = (0, 1)
    (y, lasty) = (1, 0)
    while b != 0:
        q = a // b
        (a, b) = (b, a % b)
        (x, lastx) = (lastx - q * x, x)
        (y, lasty) = (lasty - q * y, y)
    return (lastx, lasty, a)
 
def modinv(a, m):
    (inv, q, gcd_val) = gcd(a, m)
    return inv % m

#bisect macro
def index(a, x):
    #Locate the leftmost value exactly equal to x
    i = bisect_left(a, x)
    if i != len(a) and a[i] == x:
        return i
    return -1

#memoize macro
def memoize(f):
    cache = {}
    def helper(*args):
        if args not in cache:
            cache[(args)] = f(*args)
        return cache[args]
    return helper

@memoize
def nck(a,b,m):
    b = min([a-b,b])
    if (b>a or b<0 or a<0):
        return 0
    elif a == 0:
        return 1
    return (nck(a-1,b-1,m)+nck(a-1,b,m)) % m

nh=zip([1,0,-1,0],[0,1,0,-1])

###########

a,b,c=ii()

x=[a]
if b not in x:
    x.append(b)
if c not in x:
    x.append(c)

print len(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:


c = list(map(lambda x: int(x), input().split()))

print(len(set(c)))

Submission status: Accepted

Solution code:
a = raw_input().split()
print len(set(a))

Submission status: Accepted

Solution code:
a = raw_input()
a = [i for i in a.split()]
print len(set(a))

Submission status: Runtime Error

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

if __name__ == "__main__":
    iroha()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k = map(int, input().split())
p=k
for i in range(n-1):
  p *= k-1
print(p)

Submission status: Runtime Error

Solution code:
a=set(int,input().split())
print(len(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:
a, b, c = map(int, input().split())
m = set([a, b, c])
print(len(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = list(map(int, input().split(' ')))
print(b*pow(b-1, a-1))

Submission status: Runtime Error

Solution code:
3 3 33

Submission status: Runtime Error

Solution code:
data = [int(i) for i in input().split()]
 
count = 0
for i in range(len(data)):
  for j in range(i+1, len(data)):
    if (data[i] == data[j]):
      count += 1
      del data[j]
    else:
      continue
  del data[i]
print(count)

Submission status: Runtime Error

Solution code:
s = list(input().split())
print(len(set(s))

Submission status: Runtime Error

Solution code:
s = list(input())
print(len(set(s))

Submission status: Runtime Error

Solution code:
l = set(list(map, input().split()))
print(len(l))

Submission status: Runtime Error

Solution code:
sample = input()
sample_list = sample.split(" ")
count = 0
flag = 0
for i in range(len(sample_list)):
  for j in range(1, i):
    if sample_list[i] == sample_list[j]:
      flag = 1
    if flag == 0:
      count += 1
    flag = 0
  return count

Submission status: Runtime Error

Solution code:
sample = input()
sample_list = sample.split(" ")
count = 0
flag = 0
for i in range(len(sample_list)):
  for j in range(1, i):
    if L1[i] == L1[j]:
      flag = 1
    if flag == 0:
      count += 1
    flag = 0
  return count

Submission status: Runtime Error

Solution code:
j = int(input())

x = j.split()
y = []

for i in x:
  if(i not in y):
    y.append(i)
print(len(y))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = [a, b, c]
y = []

for i in x:
  if(i not in y):
    y.append(i)
print(len(y))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
s = {}
s.add(a)
s.add(b)
s.add(c)
print len(s)

Submission status: Runtime Error

Solution code:

a = int(input())
b = int(input())
c = int(input())
s = {a, b, c}
print len(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
print(len(set([input() for i in range(3)])))

Submission status: Runtime Error

Solution code:
abc = list(input().split())

print(lens(set(abc)))

Submission status: Runtime Error

Solution code:
abc=sorted(list(map(int,input().split())))
if a==c:
    print(1)
elif a==b or b==c:
    print(2)
else:
    print(3)

Submission status: Runtime Error

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

count = 0

if a != b:
  count += 1
if b != c:
  count += 1
if a != c:
  count += 1
  
print(int(count/2))

Submission status: Runtime Error

Solution code:
s=set(int(input().split()))
print(len(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, c = getNM()
print(len({a, b, c}))

Submission status: Runtime Error

Solution code:
a,b,c = (int(x) for x in input().split())
if a == b:
  if a == c:
    print (1)
  else:
    pritn (2)
else:
  if a == c:
    print (2)
  else:
    if b == c:
      print (2)
    else:
      print (3)

Submission status: Runtime Error

Solution code:
a,b,c = (int(x) for x in input().split())
if a == b:
  if a == c:
    print (1)
  else:
    pritn (2)
else:
  if a == c:
    print (2)
  else:
    print (3)

Submission status: Runtime Error

Solution code:
a = list(map(int, input()))
print(len(set(a)))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
 
if a==b and a==c:
    print("1")
elif a==b: 
    print("2")
elif a==c:
    print("2")
elif b==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 a==c:
    print(1)
elif a==b: 
    print(2)
elif a==c:
    print(2)
elif b==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 a==c:
  print(1)
elif a==b: 
  print(2)
elif a==c:
  print(2)
elif b==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 a==c:
  print(1)
elif a==b: 
  print(2)
elif a==c:
  print(2)
elif b==c:
  print(2)
else:
  print(1)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A = list(map(int,input().split()))
B = map(A)
print(len(B))

Submission status: Runtime Error

Solution code:
a = set(map(int,input()))
print(len(a))

Submission status: Runtime Error

Solution code:
#入力
lst = input().split()

#整数値化
for i in range(len(lst)):
   lst[i] = int(lst[i])

#ソート
lst.sort()

#出力
if lst[0] == lst[2]
   print(3)
elif lst[0] == lst[1] or lst[1] == lst[2]:
   print(2)
else:
   print(1)

Submission status: Runtime Error

Solution code:
#入力
lst = input().spilit()

#整数値化
for i in range(len(lst)):
   lst[i] = int(lst[i])

#ソート
lst.sort()

#出力
if lst[0] == lst[2]
   print(3)
elif lst[0] == lst[1] or lst[1] == lst[2]:
   print(2)
else:
   print(1)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if a=b and b=c:
    print(1)
elif a=b and a!=c:
    print(2)
elif a!=b and b=c:
    print(2)
elif a=c and a!=b:
    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!=c:
    print(2)
elif a!=b=c:
    print(2)
elif a=c!=b:
    print(2)
else:
    print(3)

Submission status: Runtime Error

Solution code:
a=input().split()
a.sort()
cnt=0
while len(s)>0:
    i=a.count(a.pop(0))
    for j in range(i):
        a.pop(0)
    cnt+=1
print(cnt)

Submission status: Runtime Error

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

color()

Submission status: Runtime Error

Solution code:
def paint():
    a = int(input())
    b = int(input())
    c = int(input())
    count = 1
    if a != b:
        count += 1
    if a != c and b != c:
        count += 1

    print(count)

paint()

Submission status: Runtime Error

Solution code:
def paint():
    a = int(input())
    b = int(input())
    c = int(input())
    count = 1
    if a != b:
        count += 1
    if a != c and b != c:
        count += 1

    

    print(count)

paint()

Submission status: Runtime Error

Solution code:
def paint():
    a = int(input())
    b = int(input())
    c = int(input())
    count = 3

    if a == b:
        count -= 1
    if a == c:
        count -= 1
    if b == c:
        count -= 1

    print(count)

paint()

Submission status: Runtime Error

Solution code:
print(ren(set(list(map(int, input().split()))))

Submission status: Runtime Error

Solution code:
import math
from fractions import Fraction

N = int(input())
a, b = map(int, input().split())
ret_a = a
ret_b = b
for _ in range(1, N):
    a, b = map(int, input().split())
    x = math.ceil(max(Fraction(ret_a, a), Fraction(ret_b, b)))
    ret_a = a * x
    ret_b = b * x
print(ret_a + ret_b)

Submission status: Runtime Error

Solution code:
# For taking integer inputs.
import math
from decimal import Decimal
from itertools import permutations


def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


n, k = invr()

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

print(c)

Submission status: Runtime Error

Solution code:
# For taking integer inputs.
import math
from decimal import Decimal
from itertools import permutations
 
 
def inp():
    return(int(input()))
 
 
# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))
 
 
# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))
 
 
# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))
 
 
n , k = invr()
 
c = k * (k-1)*(n-1)
print(c)

Submission status: Runtime Error

Solution code:
# For taking integer inputs.
import math
from decimal import Decimal
from itertools import permutations
 
 
def inp():
    return(int(input()))
 
 
# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))
 
 
# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))
 
 
# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))
 
 
n , k = invr()
 
print(k *(k-1)*n-1)

Submission status: Runtime Error

Solution code:
#おととい買ったペンキ
a = int(input())
#きのう買ったペンキ
b = int(input())
#今日買ったペンキ
c= int(input())
penki_list = [a,b,c]
#print(penki_list)
#print(set(penki_list))
print(len(set(penki_list)))

Submission status: Runtime Error

Solution code:
from sys import stdin
import math
N = int(stdin.readline().rstrip())
t,a = [int(x) for x in stdin.readline().rstrip().split()]
 
for _ in range(N-1):
    T,A = [int(x) for x in stdin.readline().rstrip().split()]
    n = int(max(math.ceil(t/T),math.ceil(a/A)))
    t = n*T
    a = n*A
    
print(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:
a = list[input().split()]
print(len(set(a)))

Submission status: Runtime Error

Solution code:
a = list(map(int,inptu().split()))
print(len(set(a)))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(x) (x).begin(),(x).end()
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    set<int> t;
    rep(i,3){
        int a;cin>>a;
        t.insert(a);
    }
    cout<<t.size()<<endl;
}

Submission status: Runtime Error

Solution code:
abc = lits(input().split())

print(len(set(abc)))

Submission status: Runtime Error

Solution code:
lst(list(map(str,input().split())))
a=set()
for i in range(3):
  a.add(lst[i])
print(len(a))

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,b,c=input().split()
d=list[a,b,c]
for i in range(2):
    if d.count(d[i])!=1:
        del d[i]
print(len(d))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
d=list[a,b,c]
for i in range(2):
    if d.count(d[i])!=1:
        del d[i]
print(len(d))

Submission status: Runtime Error

Solution code:
s = {input() for i in range(3)}
N = len(s)
print(N)

Submission status: Runtime Error

Solution code:
a,b.c=map(int,input().split())
L=[a,b,c]
L.sort()
if L[0]==L[2]:
  print(1)
elif　L[0]<L[1]<L[2]:
  print(3)
else:
  print(2)

Submission status: Runtime Error

Solution code:
a,b.c=map(int,input().split())
L=list[a,b,c]
L.sort()
if L[0]==L[2]:
  print(1)
elif　L[0]<L[1]<L[2]:
  print(3)
else:
  print(2)

Submission status: Runtime Error

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

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,b,c=map(int,input().split())
n=[a,b,c]
if a!=b!=c:
  print(3)
elif a=b!=c or a!=b=c or b=a!=c:
  print(2)
else:
  print(1)

Submission status: Runtime Error

Solution code:
n=int(input())
tv=1
av=1
for i in range(n):
    ti,ai=map(int,input().split())
    m=max(int((tv-1)//ti)+1,int((av-1)//ai)+1)
    tv=m*ti
    av=m*ai
print(tv+av)

Submission status: Runtime Error

Solution code:
list = set(map(int, input().split()))
print(len(set))

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
  a = []
  for i in range(3):
    a.append(int(input()))
  print(len(set(a)))

Submission status: Runtime Error

Solution code:
a = map(int ,input().split())
print(len(Counter(a)))

Submission status: Runtime Error

Solution code:
s=input()
b=input()
n=input()
list=[s,b,n]
print(len(set(list)))

Submission status: Runtime Error

Solution code:
# solution

nim, mike = map(int, input().split())
print(mike * (mike - 1) ** (nim - 1))

Submission status: Runtime Error

Solution code:
ls = list()
lt = list()
la = list()
LS = list()
LT = list()
LA = list()
N = int(input())
for i in range(1, N+1):
    T, A = map(int, input().split())
    X = T + A
    ls.append(X)
    lt.append(T)
    la.append(A)
    LS.append(X)
    LT.append(T)
    LA.append(A)
print(lt, la, LT, LA)
for j in range(1, N):
    while ls[j] < ls[j-1]:
        ls[j] += LS[j]
    while lt[j] < lt[j-1] or la[j] < la[j-1]:
        lt[j] += LT[j]
        la[j] += LA[j]
    print(lt[j], la[j], LT[j], LA[j])
print(lt[N-1] + la[N-1])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(len(a))

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 c == a:
  print(2)
else:
  print(3)

Submission status: Runtime Error

Solution code:
a = int(input().split())

print(len(list(set(a)))

Submission status: Runtime Error

Solution code:
s = set(map(int, input().split()))
print(s.count())

Submission status: Runtime Error

Solution code:
from math import ceil,floor
import sys
n = int(input())
T = [0 for i in range(n)]
A = [0 for i in range(n)]
for i in range(n):
    T[i],A[i] = map(int,input().split())
t = 1
a = 1
for i in range(n):
    t = T[i]*max(ceil(t/T[i]), ceil(a/A[i]))
    a = A[i]*max(ceil(t/T[i]), ceil(a/A[i]))

print(t+a)

Submission status: Runtime Error

Solution code:
balls, colors = map(int,input().split())

ans = 1

for i in range(1,balls+1):
  if i == 1:
    ans *= colors
  else:
    ans *= colors - 1

print(ans)

Submission status: Runtime Error

Solution code:
a,b,c = input().split()
 
score = 1
if a != b:
	score = score + 1
elif b !=c:
	score = score + 1
elif c !=a:
else:
	score = score
print(score)

Submission status: Runtime Error

Solution code:
import math

l=[]

for i in range(3):
    a=input()
    l.append(a)

print(len(set(l)))

Submission status: Runtime Error

Solution code:
if a==b==c:print('1')
elif a==b or b==c or c==a: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 c==a:
  print(2)
else:print(3)
print(a,b,c)

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 c=a:
  print(2)
else:print(3)

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,b,c=map(int,input().split())

print(len(set(a,b,c))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#ABC046.A
a = int(input())
b = int(input())
c = int(input())

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

Submission status: Runtime Error

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

ans = k
for i in range(1,n):
    ans = ans*(k-1)

print(ans)

Submission status: Runtime Error

Solution code:
List = list(map(int,input().split()))
print(len(List(set(List))))

Submission status: Runtime Error

Solution code:
abc = list(map(int, input().split()))
print(len(set(abc))

Submission status: Runtime Error

Solution code:
total = set(list(map(int, input().split)))

print(len(total))

Submission status: Runtime Error

Solution code:
print(len(set(list(map(int,input().split()))))

Submission status: Runtime Error

Solution code:
wlist = []
for i in range(3) :
    w = input()
    if not w in wlist :
        wlist.append(w)
print(len(wlist))

Submission status: Runtime Error

Solution code:
n=[]
n=input(). split(" ")
sort (n) 
c=0
p=0
if (n[1]!=n[0]):
    c=1
if(n[1]!=n[2]):
     p=1
print(c+p+1)

Submission status: Runtime Error

Solution code:
from collections import counter
n=[]
n=input()
p=counter(n). keys()
print(p)

Submission status: Runtime Error

Solution code:
from collections import collector 
n=[] 
n=input()
p=counter(n). keys() 
print(p)

Submission status: Runtime Error

Solution code:
l=list(map(int(input().split()))
n=1
ml=[]
for i in l:
 if i not in ml:
  ml.append(i)
print(len(ml))

Submission status: Runtime Error

Solution code:
a=list(map(int,input().split())
return len(set(a))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
c = list(input().split())
print(len(set(c))

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
ans = [False]*100
ans[a] |= True
ans[b] |= True
ans[c] |= True

print(sum(ans))

Submission status: Runtime Error

Solution code:
color = []
color.append(int(input(),range(3)))
x = count(color[0])
y = count(color[1])
if x == 1 and y == 1:
  print("3")
else if x == 1 and y == 2:
  print("2")
else if x == 2:
  print("2")
else:
  print("1")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
count=3
if a==b:
    count=count-1
if b==c:
    count=count-1
if c==a:
    count=count-1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c = list(map(int, input().split()))
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:
a,b,c = list(map(int, input().split()))
if a==b==c:
  print(1)
elif (a==b and b != c) or (a!=b and b==C) or (a==c and a!=b):
  print(2)
else:
  print(3)

Submission status: Runtime Error

Solution code:
l= [int(input()) for in range(3)]
c = collections.Counter(l)

print(len(c))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
c = lsit(input().split())
print(list(set(c))

Submission status: Runtime Error

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

int(sum) = 1
if a == b:
    sum +=1
if a == c:
    sum +=1
if b == c:
    sum += 1
print(sum)

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:
a = [int(i) for i in input().split()]
print(len(set(a))

Submission status: Runtime Error

Solution code:
a=list(map(input().split()))
print(len(set(a)))

Submission status: Runtime Error

Solution code:
a = input().split()
num = 3

if a[0] == a[1]:
    num = num - 1
    if a[0] == a[2]:
        num = num - 1:
elif a[0] == a[2]:
    num = num - 1
elif a[1] == a[2]:
    num = num - 1
    
print(num)

Submission status: Runtime Error

Solution code:
a = input().split()
num = 3

if a[0] == a[1]:
    num = num - 1
    if a[1] == a[2]:
        num = num - 1:
elif a[0] == a[2]:
    num = num - 1
elif a[1] == a[2]:
    num = num - 1
    
print(num)

Submission status: Runtime Error

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

num = 3

if a == b:
    num = num - 1
    if b == c:
        num = num - 1
elif b == c:
    num = num - 1
    
print('num')

Submission status: Runtime Error

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

num = 3

if a == b:
    num = num - 1
    if b == c:
        num = num - 1
elif b == c:
    num = num - 1
    
print(num)

Submission status: Runtime Error

Solution code:
a=set(list(map,input().split()))
print(len(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = set(map(int, input().split()))
print(len(set))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main()
{
    set<int> x;
    int a,b,c;
    cin>>a>>b>>c;
    x.insert(a); x.insert(b); x.insert(c);
    cout<<x.size()<<endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys
import numpy as np
from collections import deque as deq

N, K = map(int, input().split())

print(K * ((K - 1)**(N - 1)))