AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans

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-----
3 1 4

-----Sample Output-----
3

Three different colors: 1, 3, and 4.

Difficulty: EASY

Starter code:

Solutions:
abc = list(map(int, input().split()))
set_abc = set(abc)
print(len(set_abc))


a = list(map(int, input().split()))
s = set(a)
print(len(s))


def solve():
	print(len(set(input().split())))

def __starting_point():
	solve()
__starting_point()


print(len(list(set(list(input().split())))))


print(len(set([x for x in input().split()])))


s = input().split()
ans = len(list(set(s)))
print(ans)


paint = map(int, input().split())
print(len(set(paint)))


P = list(map(int, input().split()))
print(len(set(P)))


L = input().split()
print(len(set(L)))


s = set(input().split())
print(len(s))


al = list(map(int, input().split()))
print(len(set(al)))


a = input().split()
a = set(a)
print(len(a))


x = {i for i in input().split()}
print(len(x))


(a, b, c) = input().split()
print(len({a, b, c}))


S = list(map(int, input().split()))
print(len(set(S)))


S = set((int(i) for i in input().split()))
print(len(S))


li = set(map(int, input().split()))
print(len(li))


l = set(map(int, input().split()))
print(len(l))


lists = input().split()
print(len(set(lists)))


data = list(input().split())
s = 1
for i in range(1, len(data)):
	for j in range(0, i):
		if data[i] == data[j]:
			data[i] = -1
	if data[i] != -1:
		s = s + 1
print(s)


(a, b, c) = map(int, input().split())
count = 3
if a == b == c:
	print(1)
	return
if a == b:
	count -= 1
if a == c:
	count -= 1
if b == c:
	count -= 1
print(count)


colors = input().split()
print(len(set(colors)))


args = set(map(int, input().split()))
print(len(args))


caralist = input().split()
print(len(set(caralist)))


in1 = set(map(int, input().split()))
print(len(in1))


n = input().split()
n = set(n)
print(len(n))


l = input().split()
print(len(set(l)))


import collections
color = map(int, input().split())
print(len(collections.Counter(color)))


lst = input().split()
print(len(set(lst)))


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


c = input().split()
print(len(set(c)))


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


abc = list(map(int, input().split()))
count = 0
for i in range(0, len(abc) - 1):
	abc.sort()
	if abc[i] != abc[i + 1]:
		count += 1
print(count + 1)


def main():
	c = list(map(int, input().split()))
	c_set = set(c)
	print(len(c_set))

def __starting_point():
	main()
__starting_point()


(*k,) = map(int, input().split())
print(len(set(k)))


a = set(map(int, input().split()))
print(len(a))


a = list(input().split())
l = set(a)
print(len(l))


li = (a, b, c) = list(map(int, input().split()))
print(len(set(li)))


print(len(set(map(str, input().split()))))


abc = input().split()
sort = set(abc)
print(len(sort))


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


ary = list(map(int, input().split()))
print(len(set(ary)))


se = {int(i) for i in input().split()}
print(len(se))


p = list(map(int, input().split()))
print(len(set(p)))


S = input().split()
print(len(set(S)))


st = set(input().split())
print(len(st))


print(len(set(input().split(' '))))


t = set(map(int, input().split()))
print(len(t))


B = set(map(int, input().split()))
print(len(B))


col = set(map(int, input().split()))
print(len(col))


print(len({n for n in input().split()}))


inks = set(input().strip().split())
print(len(inks))


import numpy as np
a = list(map(int, input().split()))
print(len(set(a)))


(a, b, c) = map(int, input().split())
print(len(set([a, b, c])))


s = set()
l = list(input().split())
for e in l:
	s.add(e)
print(len(s))


li = input().split()
Ans = list(set(li))
print(len(Ans))


color = set(input().split())
print(len(color))


a = list(input().split())
ans = len(set(a))
print(ans)


d = set(map(int, input().split()))
print(len(d))


p = input().rstrip().split(' ')
print(len(list(set(p))))


A = set([int(x) for x in input().split()])
print(len(A))


line = input().split(' ')
print(len(set(line)))


N = map(int, input().split())
print(len(set(N)))


num = set(input().split())
print(len(num))


a = input().split()
if a[0] == a[1] == a[2]:
	print(1)
elif a[0] == a[1] or a[1] == a[2] or a[2] == a[0]:
	print(2)
else:
	print(3)


x = len(set(list(map(int, input().split()))))
print(x)


penkis = input().split()
print(len(set(penkis)))


paint = input().split(' ')
print(len(set(paint)))


a = {int(i) for i in input().split()}
print(len(a))


A = input().split()
ans = set(A)
print(len(ans))


(a, b, c) = input().split()
l = set([a, b, c])
print(len(l))


print(len({int(x) for x in input().split()}))


Can = set(input().split())
print(len(Can))


li = input().split()
print(len(set(li)))


a = input().split()
b = list(set(a))
print(len(b))


c = list(map(int, input().split()))
print(len(set(c)))


abc = map(int, input().split())
print(len(set(abc)))


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


n = set(map(int, input().split()))
print(len(n))


a = [i for i in input().split()]
print(len(set(a)))


N = input().split()
print(len(set(N)))


paint_list = map(int, input().split())
print(len(set(paint_list)))


print(len(set([c for c in input().split()])))


mylist = input().split()
print(len(set(mylist)))


print(len(set([int(n) for n in input().split()])))


print(len(set(input().rstrip().split())))


se = set(map(int, input().split()))
print(len(se))


l = set((int(i) for i in input().split()))
print(len(l))


import collections
n = list(input().split())
c = collections.Counter(n)
print(len(c))


(a, b, c) = input().split()
ls = [a, b, c]
ls.sort()
if ls[0] == ls[1] == ls[2]:
	print('1')
elif ls[0] == ls[1]:
	print('2')
elif ls[1] == ls[2]:
	print('2')
else:
	print('3')


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


col = input().split()
print(len(set(col)))


print(len(set([int(a) for a in input().split()])))


p = input().split()
print(len(set(p)))


a = map(int, input().split())
paint_list = list(a)
if paint_list[0] == paint_list[1] == paint_list[2]:
	print(1)
elif paint_list[0] == paint_list[1] and paint_list[0] != paint_list[2]:
	print(2)
elif paint_list[0] == paint_list[2] and paint_list[0] != paint_list[1]:
	print(2)
elif paint_list[1] == paint_list[2] and paint_list[0] != paint_list[1]:
	print(2)
else:
	print(3)


X = set(map(int, input().split()))
print(len(X))


def iroha():
	(a, b, c) = list(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)
	else:
		print(2)

def __starting_point():
	iroha()
__starting_point()


s = {int(i) for i in input().split()}
print(len(s))


i = list(map(int, input().split()))
print(len(set(i)))


import sys
input = lambda : sys.stdin.readline().rstrip()

def main():
	x = list(map(int, input().split()))
	print(len(set(x)))

def __starting_point():
	main()
__starting_point()


val = input().split()
print(len(set(val)))


x = input().split()
print(len(set(x)))


penki = list(map(int, input().split()))
ans = len(set(penki))
print(ans)


print(len({int(num) for num in input().split()}))


a = list(map(str, input().split()))
print(len(set(a)))


L = list(map(int, input().split()))
print(len(set(L)))


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


print(len(set([int(_) for _ in input().split()])))


B = set(input().split())
print(len(B))


import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):

	def assertIO(self, input, output):
		(stdout, stdin) = (sys.stdout, sys.stdin)
		(sys.stdout, sys.stdin) = (StringIO(), StringIO(input))
		resolve()
		sys.stdout.seek(0)
		out = sys.stdout.read()[:-1]
		(sys.stdout, sys.stdin) = (stdout, stdin)
		self.assertEqual(out, output)

	def test_入力例_1(self):
		input = '3 1 4'
		output = '3'
		self.assertIO(input, output)

	def test_入力例_2(self):
		input = '3 3 33'
		output = '2'
		self.assertIO(input, output)

def resolve():
	(a, b, c) = list(map(int, input().split()))
	ans = 0
	if a == b == c:
		print('1')
	elif a == b or b == c or c == a:
		print('2')
	else:
		print('3')

def __starting_point():
	resolve()
__starting_point()


l = input().split()
l_u = list(set(l))
print(len(l_u))


st = set(map(int, input().split()))
print(len(st))


str_line = input().split(' ')
num_line = [int(n) for n in str_line]
num_line.sort()
num_list = [num_line[0]]
for i in range(1, len(num_line)):
	if num_line[i] != num_line[i - 1]:
		num_list.append(num_line[i])
print(len(num_list))


A = set((int(i) for i in input().split()))
print(len(A))


ns = set(map(int, input().split()))
print(len(ns))


ans = len(set(map(int, input().split())))
print(ans)


(a, b, c) = list(map(int, input().split()))
data = [a]
if not b in data:
	data.append(b)
if not c in data:
	data.append(c)
print(len(data))


C = list(map(int, input().split()))
C = set(C)
print(len(C))


A = list(map(int, input().split()))
Num = [0] * 101
cnt = 0
for i in A:
	Num[i] += 1
	if Num[i] == 1:
		cnt += 1
print(cnt)


def si():
	return input()

def ii():
	return int(input())

def fi():
	return float(input())

def lint():
	return list(map(int, input().split()))

def lint_dec():
	return list(map(lambda x: int(x) - 1, input().split()))

def lnstr(n):
	return [input() for _ in range(n)]

def lnint(n):
	return [int(input()) for _ in range(n)]

def dfs_input(G, m):
	for _ in range(m):
		(a, b) = lint_dec()
		G[a].append(b)
		G[b].append(a)
print(len(set(lint())))


import math
a = set(input().split())
print(len(a))


ls = set(map(int, input().split()))
print(len(ls))


answer_set = set(input().split())
print(len(answer_set))


paint_list = input().split()
print(len(set(paint_list)))


C = set(input().split())
print(len(C))


import numpy as np
array = list(map(int, input().split(' ')))
print(len(np.unique(array)))


(a, b, c) = map(int, input().split())
ans = 1
if b != a:
	ans += 1
if a != c and b != c:
	ans += 1
print(ans)


(a, b, c) = list(map(int, input().split()))
L = []
L.append(a)
L.append(b)
L.append(c)
L = list(set(L))
print(len(L))


w = set(map(int, input().split()))
print(len(w))


lst = input().split()
if len(lst) == len(set(lst)):
	print('3')
if len(lst) - 1 == len(set(lst)):
	print('2')
if len(lst) - 2 == len(set(lst)):
	print('1')


(a, b, c) = map(int, input().split())
st = set()
st.add(a)
st.add(b)
st.add(c)
print(len(st))


arr = list(map(int, input().split()))
print(len(set(arr)))