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
l = input().split() s = set(l) print(len(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() { set<int> a; int x; for (int i = 0; i < 3; i++) { cin >> x; a.insert(x); } 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
#include<iostream> int main(){int A,B,C;std::cin>>A>>B>>C;std::cout<<(A==B&&A==C?1:A==B||B==C||A==C?2:3);}
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<bits/stdc++.h> using namespace std; int main(){ map<int,int> m; int a,b,c; cin>>a>>b>>c; m[a]++; m[b]++; m[c]++; cout<<m.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
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(); Set<Integer> list = new HashSet<>(); Collections.addAll(list, a, b, c); // 出力 System.ou...
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 = map(int, raw_input().split()) cnt = 1 if a <> b: cnt += 1 if b <> c and a <> c: cnt += 1 print cnt
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> using namespace std; int main() { int a,b,c,ans=1; cin >> a; cin >> b; if(b != a) ans++; cin >> c; if(c != a && c != b) ans++; cout << ans; 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=set(map(int,input().split())) print(len(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
penki = set(list(input().split())) print(len(penki))
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) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); Set<Integer> l = new HashSet<Integer>(); l.add(sc.nextInt()); l.add(sc.nextInt()); l.add(sc.nextInt()); System.out.println(l.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
s = {int(i) for i in input().split()} print(len(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
a,b,c=input().split() print(len({a,b,c}))
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 count; if(a==b && b==c){ count = 1; }else if(a==b || b==c || c==a){ count = 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
#include<iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << (a != b) + (a != c) + (b != c) + (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
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==b&&b==c)cout<<1<<endl; else if(a==b||b==c||a==c)cout<<2<<endl; else cout<<3<<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; import java.util.TreeSet; class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNext()){ TreeSet<Integer> set=new TreeSet<Integer>(); for(int i=0;i<3;i++) 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
x = list(map(int,input().split())) print(len(set(x)))
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 || a==c || b==c)System.out.println(2); else System.out.println(3)...
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(); int ans; if (a == b) { if (c == a) { ans = 1; } else { ans = 2; } } else { if (b == c || 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
#include<stdio.h> int main(){ int a,b,c,d=1; scanf("%d",&a); scanf("%d",&b); if(a!=b)d++; scanf("%d",&c); if(a!=c&&b!=c)d++; printf("%d\n",d); }
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 h = sc.nextInt(); int w = sc.nextInt(); int c = sc.nextInt(); if (h==w&&w==c) { System.out.println(1); } else if (h==w&&w!=c) { System.out.println(2); } else if (h!=w&&w...
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.*; // warm-up public class Main { static void solve() { Scanner sc = new Scanner(System.in); Set<Integer> s = new HashSet<Integer>(); s.add(sc.nextInt()); s.add(sc.nextInt()); s.add(sc.nextInt()); System.out.println(s.size()); sc.close(); } public static void main(String args[]) { 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; int main(){ int a,b,c; cin>>a>>b>>c; cout<<(a==b&&a==c?1:a!=b&&a!=c&&b!=c?3:2); }
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
color = set(input().split()) print(len(color))
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 count = 0; if(a==b&&b==c){ System.out.println(1); }else{ if(a!=b){ 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
inks = set(input().strip().split()) print(len(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
#include<bits/stdc++.h> using namespace std; set<int> ada; int main(){ for(int i=0;i<3;i++){ int x; cin >> x; ada.insert(x); } cout << ada.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
#include <bits/stdc++.h> using namespace std; int main() { int n,i; set<int>s; for(i=0;i<3;i++) { cin>>n;s.insert(n); }cout<<s.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
import java.util.Scanner; public class Main { public static void main(String[] args) { int a,b,c; Scanner foo = new Scanner(System.in); a = new Integer(foo.next()).intValue(); b = new Integer(foo.next()).intValue(); c = new Integer(foo.next()).intValue(); if (a == b && b == c) { System.out.println("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
import java.util.HashSet; import java.util.Scanner; import java.util.Set; import java.util.stream.IntStream; public class Main { /** 入力数字の数 */ private static final int N = 3; public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { Set<Integer> set = new HashSet<>(); IntSt...
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(list(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
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.HashSet; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] strs = br.readLine().split("...
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
c = input().split() print(len(list(set(c))))
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; import java.util.Set; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) { Set<Integer> set = new HashSet<>(); for (int i = 0; i < 3; i++) { set.add(sc.nextInt()); } System.out.println(set.siz...
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 = set(map(int,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
#include <iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a==b && b==c){cout <<1;} else if(a==b||b==c||c==a){cout<<2;} else{cout<<3;} }
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 <bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; set <int> s; s.insert(a); s.insert(b); s.insert(c); cout << 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(){ int a,b,c; cin>>a>>b>>c; int count=1; if(a!=b) count++; if(a!=c&&b!=c) count++; cout<<count; }
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 in = new Scanner(System.in); Set<Integer> set = new HashSet<Integer>(); for (int i = 0; i < 3; i++) { set.add(in.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
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c; if(a==b&b==c&c==a)cout<<1; else if(a!=b&b!=c&c!=a)cout<<3; else cout<<2;}
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 <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; set<int> junjo={a,b,c}; cout << junjo.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
import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { @SuppressWarnings("resource") Scanner scan = new Scanner(System.in); Set<Integer> paintCans = new HashSet<Integer>(); paintCans.add(scan.nextInt()); paintCans.add(scan.next...
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 scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); if(a == b && b == c){ System.out.println("1"); return; } 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
#include <bits/stdc++.h> using namespace std; int main() { set<int> s; 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
val = input().split() print(len(set(val)))
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> set1{a,b,c}; cout << set1.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 = list(input().split()) l = set(a) 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
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int sum = 3; if(a == b) sum-=1; if(a == c) sum-=1; if(b == c) sum-=1; if(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
print len(set([x for x in 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
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 || c==a))){ System.out.println(3); }else if (a==b && b==c){ System.out.println(...
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() 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<stdio.h> bool ck[110]; int main() { int a,b,c,ans=0; scanf("%d%d%d",&a,&b,&c); ck[a]=1;ck[b]=1;ck[c]=1; for(int i=1;i<=110;i++)ans+=ck[i]; printf("%d",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
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 total; if(a==b && b==c) total=1; else if((a==b && b!=c)||(b==c && c!=a)||(a==c && b!=c)) total=2; else tot...
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([c for c 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
print(len(set(input().strip().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
#include<iostream> using namespace std; int main(){ int a, b, c; cin>>a>>b>>c; if(a==b&&b==c)cout<<"1\n"; else if(a==b||a==c||b==c)cout<<"2\n"; else cout<<"3\n"; }
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 = list(input().split()) b = set(a) print(len(b))
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
lst = input().split() print(len(set(lst)))
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) throws Exception { Scanner sc = new Scanner(System.in); //重複を許可しない集合構造 Set<Integer> set = new HashSet<>(); //a,b,cの格納 set.add(sc.nextInt()); set.add(sc.nextInt()); set....
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 scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int k = 0; if(a != b){ k++; } if(b != c){ k++; } if(a != c){ k++; ...
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 - min((a == b) + (b == c) + (c == a), 2) << 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(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
a,b,c = map(int,raw_input().split()) x = [False for i in range(101)] x[a] = True x[b] = True x[c] = True cnt = 0 for i in x: if i: cnt+=1 print cnt
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(), b = sc.nextInt(), c = sc.nextInt(); int count = 1; if(b != a) count++; if(c != b && c != a) count++; System.out.println(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
C = set(input().split()) print(len(C))
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) { // TODO Auto-generated method stub 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 != ...
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; set<int> ans={a,b,c}; cout << ans.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 = [int(x) for x in raw_input().split()] d = {} for x in A: d[x] = 1 print len(d.keys())
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=[] a=map(int, raw_input().split()) print(len(set(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 sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); HashSet<Integer> result = new HashSet<>(); resul...
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.ArrayList; import java.util.List; 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(); List<Integer> list = new ArrayList<>(); list.add(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
P=list(map(int,input().split())) print(len(set(P)))
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> ans; int a,b,c; cin>>a>>b>>c; ans.insert(a); ans.insert(b); ans.insert(c); cout<<ans.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
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a,b,c ; 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...
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(); int ans=3; if(a==b)ans--; if(a==c)ans--; if(b==c)ans--; 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
#include <iostream> using namespace std; int main() { int a, b, c, ans = 1; cin >> a >> b >> c; if (b-a != 0 && c-a != 0)ans++; if (b != c)ans++; cout << ans << 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(); int b = sc.nextInt(); int c = sc.nextInt(); if (a == b && c == a) { System.out.println(1); } else if (a == b || b == c || a == c) { System.out.println(...
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(); int ans = 0; if (a == b) { ans +=1; } if(b==c) { ans +=1; } if(a==c) { ans +=1; } if(3-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
print(len(list(set(list(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
num = set(input().split()) print(len(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
# -*- coding: utf-8 -*- 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
print(len(set(list(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
def main(): inpt = raw_input().split() cnt = 0 for i in range(0, 3): if inpt[i] == inpt[(i+1)%3]: cnt += 1 if cnt == 3: cnt -= 1 print 3 - cnt main()
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
s = list(set(input().split())) print(len(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.Scanner; import java.util.List; import java.util.ArrayList; import java.util.Collections; import java.util.List; 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=1; 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
a, b, c = map(int, raw_input().split()) if a == b and b == c: print 1 elif a != b and b != c and c != a: print 3 else: print 2
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; import java.util.Set; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); Set<Integer> s = new HashSet<Integer>(); for (int i = 0; i < 3; i++) { s.add(in.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
l=map(int,raw_input().split()) c=3 for i in l: if l.count(i)==3: c= 1 break elif l.count(i)==2: c= 2 break print c
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 cnt = 1; if (a != b) { cnt++; if (b != c && a != c) { 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
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
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.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] x = new int[3]; int ans = 1; for (int i = 0; i < 3 ;i++) { x[i] = sc.nextInt(); } Arrays.sort(x); for (int i = 0; i < 2; i++) { if (x[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
mylist = input().split() print(len(set(mylist)))
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 <iostream> #include <set> using namespace std; int main() { set<int> s; for (int a; cin >> a;) { s.insert(a); } 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
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(), ans = 3; if(a == b) ans--; if(b == c) ans--; if(a == c) ans--; if((a == b) && (b == 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
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int cnt=1; if(a!=b) cnt++; if(a!=c&&b!=c) cnt++; cout<<cnt<<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
#include <iostream> #include <set> using namespace std; int main(){ int a; set <int> set_i; for(int i=0;i<3;i++){ cin >> a; set_i.insert(a); } cout << set_i.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([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
a = map(int, input().split()) print(len(set(a)))
PYTHON3