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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | c = input().split()
print(len(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | l = input().split()
l_u = list(set(l))
print(len(l_u)) | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int ans=1;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if(b!=a)ans++;
if(c!=a&&c!=b)ans++;
printf("%d",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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<iostream>
int main() {
int a, b, c;
std::cin >> a >> b >> c;
std::cout << ((a == b && b == c)?1:((a == b || b == c || c == a)?2:3)) << std::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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
HashSet<String> set = new HashSet<String>();
set.add(sc.next());
set.add(sc.next());
set.add(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<stdio.h>
int a,b,c;
int main()
{
scanf("%d%d%d",&a,&b,&c);
printf("%d\n",a==b&&a==c&&b==c?1:(a==b||a==c||b==c?2:3));
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<cstdio>
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a==b&&b==c)
printf("1\n");
else if(a!=b && a!=c && c!=b)
printf("3\n");
else
printf("2\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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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 = 0;
if(A == B && B == C){
ans = 1;
}else if(A == B || B == C || C == A){
ans = 2;
}else{
ans = 3;
}
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<iostream>
using namespace std;
int main(){
int a,b,c;cin>>a>>b>>c;
if(a==b and b==c)cout<<1<<endl;
else if(a!=b and b!=c and a!=c)cout<<3<<endl;
else cout<<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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll mx=1e9+7;
int main() {
int a,b,c;
cin>>a>>b>>c;
set<int> s{a,b,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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <iostream>
using namespace std;
int main() {
int a, b, c, x = 3;
cin >> a >> b >> c;
if (a == b || b == c || c == a) x--;
if (a == b && b == c) x--;
cout << x << 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;cin>>a>>b>>c;
int ans=3;
if(a==b&&b==c)ans=1;
else if(a==b||b==c||c==a)ans=2;
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | import java.util.*;
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 && a == c )cnt = 1;
else if( a == b || a == c || b == c)cnt = 2;
else cnt = 3;
System.out.println(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | a, b, c = map(int, raw_input().split())
print len(set([a, b, 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | import java.util.Scanner;
public class Main {
//問題A-Atcoder君とペンキ
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int count = 1;
int[] a = new int[3];//ペンキは3種類
for (int i = 0; i < 3; i++) {
a[i] = sc.nextInt();//入力
}
if (a[0]!=a[1]) {
count++;
}
if(a[1]!=a[2]&&a[2]!=a[0]){
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int count = 1;
if (b != a) {
count++;
}
if (c != b && c != a) {
count++;
}
System.out.println(count);
} finally {
sc.close();
}
}
} | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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();
} | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | B=set(input().split())
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
cout << 3 - (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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
for(int i=0; i<3; i++){
int num = Integer.parseInt(sc.next());
if(map.get(num) == null){
map.put(num, 1);
}
}
System.out.println(map.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | abc=map(int,input().split())
print(len(set(abc)))
| 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | s = set(list(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin >> a >> b >> c;
set<int> st { a, b, c };
cout << st.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main()
{
map< int, int > v;
for(int i = 0; i < 3; i++) {
int x;
cin >> x;
v[x]++;
}
cout << v.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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);
ArrayList<Integer> u = new ArrayList<Integer>();
for(int i = 0; i < 3; i++) {
int p = sc.nextInt();
if(!u.contains(p)) {
u.add(p);
}
}
System.out.println(u.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int> s; int a;
for(int i = 0; i < 3; i++) {
cin >> a;
s.insert(a);
}
cout << s.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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> cnt = new HashSet<>();
cnt.add(a);
cnt.add(b);
cnt.add(c);
System.out.println(cnt.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | print(len(list(set(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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> lista = new HashSet<Integer>();
for(int i =0; i < 3; i++) {
lista.add(scan.nextInt());
}
System.out.println(lista.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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 answer=0;
answer=answer+1;
if(b!=a){
answer=answer+1;
}
if(c!=a&&c!=b){
answer=answer+1;
}
System.out.println(answer);
}
}
| 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | print(len({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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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 = 1;
if (a != b)
ans++;
if (b != c && c != a)
ans++;
System.out.println(ans);
sc.close();
}
}
| 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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 total = 3;
if(a == b || a == c || b == c){
total = 2;
}
if(a == b && a == c && b == c){
total = 1;
}
System.out.println(total);
}
}
| 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #46a
s = 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main (){
int a,b,c;
cin>>a>>b>>c;
cout<<(a==b&&b==c?1:a==b||b==c||a==c?2: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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | colors = set(input().split())
print(len(colors))
| 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
#define ll long long
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();
} | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
#include <vector>
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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 << 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a, b, c, count = 3;
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
if(a == b && a == c)count = 1;
else if(a == b && a != c)count = 2;
else if(a == c && a != b)count = 2;
else if(b == c && a != b)count = 2;
System.out.println(count);
sc.close();
}
}
| 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int ans=3;
if(a==b||a==c)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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #ABC046
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int>x;
for(int i=0;i<3;i++){
int y;
cin>>y;
x.insert(y);
}
cout<<x.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
cout << 3 - ((a == b) + (a == c) + (b == c) - (a == b && a == c));
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | x = len(set(list(map(int,input().split()))))
print(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | print(len(set(map(str,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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | args = set(map(int, input().split()))
print(len(args)) | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | x=set(map(int,raw_input().split()))
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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||c==a){
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, i=3;
cin >>a >>b >>c ;
if(a==b) i--;
if(a==c) i--;
else if(b==c)i--;
cout << i << 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | a, b, c = map(int, raw_input().split())
if (a==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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int> c;
for (int i=0; i<3; i++) {
int t;
cin >> t;
c.insert(t);
}
cout << c.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,ans=3;
cin>>a>>b>>c;
if(a==b ||b==c||c==a)
ans--;
if(a==b&&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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<stdio.h>
int main(){
int a,b,c,s=3;
scanf("%d %d %d",&a,&b,&c);
if(a==b)s--;
if(a==c)s--;
if(b==c)s--;
if(s==0)s=1;
printf("%d",s);
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | S = set(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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(b!=a) cnt++;
if(c!=b&&c!=a) cnt++;
System.out.println(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<iostream>
#include<cstdio>
using namespace std;
int main() {
int a, b, c = 0 ;
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
int s=1;
if(a!=b)s++;
if(a!=c&&b!=c)
s++;
cout<<s<<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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int x;
map<int,int> a;
int main(){
cin>>x;a[x]++;
cin>>x;a[x]++;
cin>>x;a[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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | import java.util.Scanner;
public class Main {
static int a, b, c;
static boolean[] check;
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt();
check = new boolean[101];
check[a] = check[b] = check[c] = true;
int count = 0;
for(int i = 1; i <= 100; i++){
if(check[i]){
++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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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();
int ans=1;
if (a!=b) {
ans++;
}
if(c!=b&&c!=a) {
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | l=[int(i) for i in input().split()]
print(len(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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);
}
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | from collections import Counter
cs=map(int,raw_input().split())
c = Counter(cs)
print len(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | col = set(map(int,input().split()))
print (len(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | print(len(set([int(a) for a 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | a,b,c = map(int,raw_input().split())
if a == b and a == 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <stdio.h>
int t,p[101],ans;
int main() {
for(int i=0;i<3;i++) {
scanf("%d",&t);
p[t]=1;
}
for(int i=1;i<101;i++)
if(p[i]) ans++;
printf("%d\n",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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <iostream>
#include <set>
using namespace std;
int main() {
int x;
set<int>s;
for (int i = 0; i < 3; ++i) {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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | a,b,c = input().split()
l=set([a,b,c])
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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();
Set<Integer> hs = new HashSet<>();
hs.add(a);
hs.add(b);
hs.add(c);
System.out.println(hs.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | import java.util.Scanner;
class Main{
public static void main(String[] main) {
Scanner sc=new Scanner(System.in);
boolean[] unko=new boolean[101];
for(int i=0; i<101; i++) {
unko[i]=false;
}
for(int i=0; i<3; i++) {
unko[sc.nextInt()]=true;
}
int kosu=0;
for(int i=0; i<=100; i++) {
if(unko[i]) {
kosu++;
}
}
System.out.println(kosu);
}
} | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <iostream>
using namespace std;
int main(){
int a, b, c, ans = 1;
cin >> a >> b >> c;
if ( a != b ) ans++;
if ( a != c && 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | a=map(int,input().split())
print(len(list(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | a = set(list(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | a,b,c = input().split(' ')
print(len(set((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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<iostream>
#include<set>
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();
} | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | B=set(map(int,input().split()))
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | a = len(set(map(int, input().split())))
print(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 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();
scan.close();
if(a==b) {
if(b!=c)System.out.println("2");
else System.out.println("1");
}else {
if(a==c)System.out.println("2");
else if(c==b)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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
@SuppressWarnings("resource")
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
Set<Integer> set = new HashSet<>();
set.add(a);
set.add(b);
set.add(c);
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | # A
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int> st;
for (int i = 0; i < 3; i++) {
int j;
cin >> j;
st.insert(j);
}
cout << st.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | M = map(int, raw_input().split())
# M = [1,2,2]
print len(set(M)) | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | s=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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d=3;
cin>>a>>b;
if(a==b)
d--;
cin>>c;
if(a==c || b==c)
d--;
cout<<d<<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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | x = 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | colors = len(set(input().split()))
print(colors) | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
cout << 1 +(a != b) + (b != c) * (c != a) << 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include<bits/stdc++.h>
using namespace std; int main() {set<int> s;int x;cin >> x;s.insert(x);cin >> x;s.insert(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <iostream>
#include <set>
using namespace std;
int main() {
int a,b,c;
cin >>a>>b>>c;
set<int> x;
x.insert(a);x.insert(b);x.insert(c);
cout<<x.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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <iostream>
#include <set>
using namespace std;
int main() {
int a, b, c;
set<int> s;
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | # encoding: utf-8
import collections
l = raw_input().split()
print len(collections.Counter(l).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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | s = list(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | c = list(input().split())
print(len(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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | #include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<1+(a!=b)+(b!=c&&a!=c);
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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 | t = set(map(int, input().split()))
print(len(t)) | 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 might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
* 1≦a,b,c≦100
Input
The input is given from Standard Input in the following format:
a b c
Output
Print the number of different kinds of colors of the paint cans.
Examples
Input
3 1 4
Output
3
Input
3 3 33
Output
2 | 6 | 0 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
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 {
System.out.println("3");
}
}
} | JAVA |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.