Search is not available for this dataset
name
stringlengths
2
112
description
stringlengths
29
13k
source
int64
1
7
difficulty
int64
0
25
solution
stringlengths
7
983k
language
stringclasses
4 values
p03962 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 migh...
6
0
input = raw_input() l = input.split(" ") a = map(int,l) a2 = list(set(a)) print len(a2)
PYTHON
p03962 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 migh...
6
0
print(len(set(map(int, input().split()))))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int co = 3; if(a==b){co--;} if(a==c){co--;} if(b==c){co--;} i...
JAVA
p03962 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 migh...
6
0
print(len(set([int(x) for x in input().split()])))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; import java.io.*; public class Main { public static void main(String[]args){ Scanner sc = new Scanner(System.in); PrintWriter ou = new PrintWriter(System.out); int[] a = new int[3]; for(int i = 0 ; i < 3 ; i++) a[i] = Integer.parseInt(sc.next()); sc.close(); Arrays.sort(a); int yon...
JAVA
p03962 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 migh...
6
0
list = (input().split()) print(len(set(list)))
PYTHON3
p03962 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 migh...
6
0
a = list(input().split()) print(len(set(a)))
PYTHON3
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int a = stdIn.nextInt(); int b = stdIn.nextInt(); int c = stdIn.nextInt(); if (a == b && b == c) { System.out.println(1); } else if (a == b || b == c || c == a){ System...
JAVA
p03962 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 migh...
6
0
import sys print len(set(sys.stdin.readline().split()))
PYTHON
p03962 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 migh...
6
0
A=set(int(i) for i in input().split()) print(len(A))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; import java.util.stream.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println(Arrays.stream(scanner.nextLine().split(" ")).collect(Collectors.toSet()).size()); } }
JAVA
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] a = new int[100]; int ans = 0; for(int i = 0; i < 3; i++) { int c = sc.nextInt() - 1; if(a[c] > 0) { a[c]++; } else { ans++; a[c]++; ...
JAVA
p03962 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 migh...
6
0
nums = list(input().split()) print(len(set(nums)))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); Set<Integer> set1 = new HashSet<>(); for(int i = 0; i < 3; i++){ set1.add(sc.nextInt()); } System.out.println(set1.size()); ...
JAVA
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int[]penki = new int[101]; int a = stdIn.nextInt(); int b = stdIn.nextInt(); int c = stdIn.nextInt(); penki[a] = a; penki[b] = b; penki[c] = c; int cnt = 0; ...
JAVA
p03962 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 migh...
6
0
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a != b && a != c && b != c)System.out.println("3"); else if(a == b && a == c)System.out.println("1"); else System.out.print...
JAVA
p03962 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 migh...
6
0
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int ans=1; if(b!=a)ans++; if(c!=a&&c!=b)ans++; cout<<ans; }
CPP
p03962 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 migh...
6
0
n=input().split();n=set(n);print(len(n))
PYTHON3
p03962 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 migh...
6
0
col = input().split() print(len(set(col)))
PYTHON3
p03962 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 migh...
6
0
#include<iostream> using namespace std; int main(){ int a,b,c,d=3; cin>>a>>b>>c; if(a==b)d--; if(c==b)d--; else if(c==a)d--; cout<<d; return 0; }
CPP
p03962 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 migh...
6
0
s=input().split(' ') print(len(set(s)))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int ans; if (a == b && b == c) { ans = 1; } else if (a == b || b == c || c == a) { ans =...
JAVA
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] colors = new int[100]; for (int i = 0; i < 3; i++) { int color = sc.nextInt(); colors[color - 1] = 1; } int sum = 0; for (int i = 0; i < colors.length; i++) { sum...
JAVA
p03962 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 migh...
6
0
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << 1 + (a != b) + (a != c && b != c) << endl; }
CPP
p03962 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 migh...
6
0
inp = raw_input() print len(set(inp.strip().split(' ')))
PYTHON
p03962 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 migh...
6
0
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int[]a = new int[3]; ArrayList<Integer>ans = new ArrayList<>(); for(int i=0; i<3; i++) { a[i] = sc.nextInt(); if(!ans.contain...
JAVA
p03962 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 migh...
6
0
#include <bits/stdc++.h> using namespace std; set<int>st; int main(){ int x=3; while(x--){int y;cin>>y;st.insert(y);} cout<<st.size(); }
CPP
p03962 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 migh...
6
0
n = set(input().split()) print(len(n))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); List<Integer> list = new ArrayList<Integer>(); while (sc.hasNext()) { list.add(sc.nextInt()); } List<Integer> listB = new ArrayList<Integer>(new HashSet<>(list)); System...
JAVA
p03962 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 migh...
6
0
from sys import stdin a = map(int,stdin.readline().split()) a = set(a) print len(a)
PYTHON
p03962 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 migh...
6
0
import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); HashSet<Integer> a = new HashSet<>(); for (int i = 0; i < 3; i++){ a.add(scan.nextInt()); } System.out.println(a...
JAVA
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if (a == b && b == c) System.out.println("1"); else if (a == b || b == c || a == c) System.o...
JAVA
p03962 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 migh...
6
0
a = {int(x) for x in input().split()} print(len(a))
PYTHON3
p03962 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 migh...
6
0
import java.util.HashSet; import java.util.Scanner; public class Main{ public static void main(String args[]) { HashSet<String> hs = new HashSet<String>(); Scanner sc = new Scanner(System.in); for (int i = 0; i < 3; i++) { hs.add(sc.next()); } System.out.printl...
JAVA
p03962 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 migh...
6
0
l=input().split() print(len(list(set(l))))
PYTHON3
p03962 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 migh...
6
0
print len(set(raw_input().split(' ')))
PYTHON
p03962 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 migh...
6
0
#include<iostream> #include<set> using namespace std; int main(){ set<int> s; int a[3]; for(int i=0;i<3;i++){ cin>>a[i]; s.insert(a[i]); } cout<<s.size()<<endl; }
CPP
p03962 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 migh...
6
0
a,b,c = map(int, raw_input().split()) s = set([a, b, c]) print len(s)
PYTHON
p03962 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 migh...
6
0
#include<bits/stdc++.h> using namespace std; int main(){ set<int> s; for(int i=0;i<3;i++){ int X; cin>>X; s.insert(X); } cout<<s.size()<<endl; }
CPP
p03962 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 migh...
6
0
se = set(map(int,input().split())) print(len(se))
PYTHON3
p03962 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 migh...
6
0
a, b, c = map(int, raw_input().split()) colour_list = [a, b, c] bought = [] count = 0 for x in colour_list: if x not in bought: bought.append(x) count += 1 print count
PYTHON
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int[] a = new int[3]; int i,cnt = 0; for(i=0;i<3;i++) a[i]=sc.nextInt(); if(a[0]!=a[1]) cnt++; if(a[0]!=a[2]) cnt++; ...
JAVA
p03962 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 migh...
6
0
n = list(map(int,input().split())) print(len(set(n)))
PYTHON3
p03962 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 migh...
6
0
#include <iostream> #include <set> using namespace std; int main(void){ int a,b,c; cin >> a >> b >> c; set<int> st{a,b,c}; cout << st.size() << endl; return 0; }
CPP
p03962 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 migh...
6
0
S = list(map(int, input().split())) print(len(set(S)))
PYTHON3
p03962 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 migh...
6
0
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; cout << max(1, ((a != b)+(b != c)+(c != a))) << endl; }
CPP
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // スペース区切りの整数の入力 int a = sc.nextInt(); int b = sc.nextInt(); int c= sc.nextInt(); // 出力 if ((a==b && a!=c) || (a==c && a!=b) || (b==c&& a!=c)) { System.out.println(2); ...
JAVA
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); HashSet<Integer> s = new HashSet<Integer>(); for (int i = 0; i < 3; i++) { s.add(sc.nextInt()); } System.out.println(s.size()); } }
JAVA
p03962 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 migh...
6
0
input_line1 = map(int,raw_input().split(" ")) #input_line2 = map(int,raw_input().split(" ")) a = [] for i in range(3): if input_line1[i] not in a: a.append(input_line1[i]) print len(a)
PYTHON
p03962 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 migh...
6
0
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan=new Scanner(System.in); int a=scan.nextInt(); int b=scan.nextInt(); int c=scan.nextInt(); int count=3; if(a==b){count--; }if(b==c){count--; }if(a==c){count--; } if(count==0) { count++; }...
JAVA
p03962 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 migh...
6
0
a=list(map(str,input().split())) print(len(set(a)))
PYTHON3
p03962 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 migh...
6
0
st = set(map(int, input().split())) print(len(st))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; // . > class Main{ public static void main(String args[]){ Scanner in = new Scanner(System.in); // String a = in.nextLine(); int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(); Set<Integer> set = new HashSet<>(); set.add(a); set.add(b); set.add(c); // 125 // 12 5 // 1 2...
JAVA
p03962 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 migh...
6
0
import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Set<Integer> set = new HashSet<>(); for (int i = 0; i < 3; i++) set.add(sc.nextInt()); System.out.println(set.size()); sc.clos...
JAVA
p03962 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 migh...
6
0
line =input().split(' ') print(len(set(line)))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args) { Scanner in =new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); int ans = 3; if(b==a) ans--; if(c==a) ans--; if(c==b) ans--; if(ans==0) ans++; System.out.println(ans); } }
JAVA
p03962 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 migh...
6
0
a = input().split() a = set(a) print(len(a))
PYTHON3
p03962 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 migh...
6
0
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a==b && b==c) System.out.println(1); else if(a==b || b==c || c==a) ...
JAVA
p03962 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 migh...
6
0
#include "bits/stdc++.h" using namespace std; int main(){ set<long int> s; long int a,b,c; cin >> a >> b >> c; s.insert(a); s.insert(b); s.insert(c); cout << s.size() << endl; }
CPP
p03962 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 migh...
6
0
penkis = input().split() print(len(set(penkis)))
PYTHON3
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if (a==b && b==c) { System.out.println("1"); } else if (a==b | b==c | a==c) { System.out.println("2"); } els...
JAVA
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { void run() { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int cnt = 1; if (b != a) { cnt++; } if (c != a && c != b) { cnt++; } System.out.println(cnt); } public static void main(S...
JAVA
p03962 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 migh...
6
0
N = input().split() num = len(set(N)) print(num)
PYTHON3
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int a=scan.nextInt(); int b=scan.nextInt(); int c=scan.nextInt(); int cnt=0; if(a!=b && b!=c && c!=a) cnt=3; else if(a==b ...
JAVA
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == b && b == c) { System.out.println(1); } else if(a == b || b == c || c == a) { System.out.pr...
JAVA
p03962 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 migh...
6
0
i = raw_input().split(' ') if i[0] != i[1]: if i[1] != i[2]: re = 3 if i[2] != i[0] else 2 else: re = 2 else: re = 2 if i[1] != i[2] else 1 print re
PYTHON
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { public static void main(String[] args){ // TODO Auto-generated method stub System.err.println("starts..."); Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == b && a == c){ System.out.print("1\...
JAVA
p03962 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 migh...
6
0
i=list(map(int, input().split())) print (len(set(i)))
PYTHON3
p03962 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 migh...
6
0
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout << max(1, 3-(a==b)-(b==c)-(a==c)) << endl; }
CPP
p03962 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 migh...
6
0
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt(); if (a != b && b != c && c!= a) System.out.println("3"); else if (a != b || b != c || c != a) System.out.println("2"); else S...
JAVA
p03962 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 migh...
6
0
import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); int n[]=new int[3],s=1,i,j,t; for(i=0;i<3;i++) n[i]=stdIn.nextInt(); for(i=0;i<2;i++) { for(j=2;j>i;j--) { if(n[j-1]>n[j]) { t=n[j-1]; n[j-1]=n[j]; n[j]=t; } } } ...
JAVA
p03962 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 migh...
6
0
import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); HashSet<Integer> set = new HashSet<Integer>(); for (int i=0; i < 3; i++){ set.add(Integer.parseInt(sc.next())); } System.out.println(set.size()); } }
JAVA
p03962 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 migh...
6
0
L = set(map(int, input().split())) print(len(L))
PYTHON3
p03962 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 migh...
6
0
print(len({int(i) for i in input().split()}))
PYTHON3
p03962 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 migh...
6
0
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == b && a == c){ System.out.println(1); } else if (a != b && a!= c && b != c){ S...
JAVA
p03962 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 migh...
6
0
#include<bits/stdc++.h> using namespace std; set < int > S; int main(){ int x; for(int i=1;i<=3;++i) scanf("%d",&x),S.insert(x); printf("%d",S.size()); return 0; }
CPP
p03962 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 migh...
6
0
#include <iostream> using namespace std; int main(void){ int a,b,c,count=1; cin >> a; cin >>b; if(a!=b)count++; cin >> c; if(c!=a && c!=b)count++; cout << count << endl; }
CPP
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int a = sc.nextInt(); final int b = sc.nextInt(); final int c = sc.nextInt(); Set<Integer> se = new HashSet<Integer>(); se.add(a); se.a...
JAVA
p03962 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 migh...
6
0
print(len({int(_) for _ in input().split()}))
PYTHON3
p03962 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 migh...
6
0
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); int a = keyboard.nextInt(); int b = keyboard.nextInt(); int c = keyboard.nextInt(); int count = 0; if(a == b && b == c) { count = 1; }els...
JAVA
p03962 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 migh...
6
0
inks = input().split() print(len(set(inks)))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); List<Integer> list = new ArrayList<>(); for(int i = 0;i < 3;i++){ int n = sc.nextInt(); if(!list.contains(n)) list.add(n); } System.out.println(li...
JAVA
p03962 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 migh...
6
0
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << 3-(a==b)-(b==c)-(c==a)+(a==b && b==c) << endl; }
CPP
p03962 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 migh...
6
0
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == b && b == c) System.out.println("1"); else if(a == b || b == c || c == a) System.out.println("2"); else ...
JAVA
p03962 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 migh...
6
0
a, b, c = raw_input().split() if a == b and a == c: print "1" elif a == b and a != c: print "2" elif a == c and a != b: print "2" elif b == c and b != a: print "2" elif c == b and c != a: print "2" else: print "3"
PYTHON
p03962 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 migh...
6
0
in1 = set(map(int,input().split())) print(len(in1))
PYTHON3
p03962 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 migh...
6
0
*a, = map(int, input().split()) print(len(set(a)))
PYTHON3
p03962 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 migh...
6
0
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; set<int> color = {a, b, c}; cout << color.size() << endl; }
CPP
p03962 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 migh...
6
0
print(len(set(list(input().split()))))
PYTHON3
p03962 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 migh...
6
0
a, b, c = map(int, raw_input().split()) x = {a, b, c} print len(x)
PYTHON
p03962 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 migh...
6
0
import java.util.Scanner; public class Main{ public static void main(String[]args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int count = 3; if(a == b) { count -= 1; } if(a == c) { count -= 1; } if(b == c) { count -= 1; } if...
JAVA
p03962 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 migh...
6
0
import java.util.Scanner; import java.util.HashSet; import java.lang.String; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); HashSet<Integer> pcolors = new HashSet<Integer>(); pcolors.add(sc.nextInt()); pcolors.add(sc.nextInt()); pcolors.add(s...
JAVA
p03962 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 migh...
6
0
#include<iostream> #include<set> using namespace std; int main(){ set<int>a; int x,y,z; cin>>x>>y>>z; a.insert(x); a.insert(y); a.insert(z); cout<<a.size()<<endl; }
CPP
p03962 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 migh...
6
0
l = map(int,raw_input().split()) print len(set(l))
PYTHON
p03962 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 migh...
6
0
print(len({int(num) for num in input().split()}))
PYTHON3
p03962 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 migh...
6
0
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); HashSet<Integer> set = new HashSet<Integer>(); set.add(sc.nextInt()); set.add(sc.nextInt()); set.add(sc.nextInt()); System.out.println(set.size()); } }
JAVA
p03962 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 migh...
6
0
ans = len(set(map(int, input().split()))) print(ans)
PYTHON3
p03962 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 migh...
6
0
#include <bits/stdc++.h> using namespace std; int main() { set<int> s; for (int i=0;i<3;i++){ int x; cin >> x; s.insert(x); } cout << s.size() << endl; }
CPP
p03962 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 migh...
6
0
l=set(input().split());print(len(l))
PYTHON3
p03962 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 migh...
6
0
#include <bits/stdc++.h> using namespace std; int main() { int x, y, z; scanf("%d%d%d", &x, &y, &z); int s = 1; if (y != x) s++; if (z != y && z != x) s++; printf("%d\n", s); }
CPP