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 | s=input()
print(len(set(s.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 | #include<iostream>
using namespace std;
int main(void)
{
int a,b,c;
cin >> a >> b >> c;
cout << (a==b ? (b==c ? 1:2):(a==c ? 2:(b==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 | 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 && c != a) {
System.out.println(3);
} else if (a == b && b == c && c == a) {
System.out.println(1);
} else {
System.out.println(2);
}
}
}
| JAVA |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 scanner = new Scanner(System.in);
int[] arr = new int[101];
int count = 0;
for (int i = 0; i < 3; i++) {
int n = scanner.nextInt();
if (arr[n] == 0){
count ++;
arr[n] = 1;
}
}
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 | #include <iostream>
#include <set>
using namespace std;
int main(){
set<int> s;
for(int i = 0, t; i < 3; i++)
cin >> t, s.insert(t);
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 | str = input().split()
print(len(set(str))) | 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.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
List<Integer> list = new ArrayList<Integer>();
list.add(a);
list.add(b);
list.add(c);
List<Integer> hashList = new ArrayList<Integer>(new HashSet<>(list));
System.out.println(hashList.size());
scan.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 | p = input().split()
print(len(list(set(p)))) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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;
set<int> s;
int main(){
for(int i=1;i<=3;i++){
int x;
cin>>x;
s.insert(x);
}
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 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int c = Integer.parseInt(sc.next());
int n=0;
if(a == b && b == c) {
n = 1;
}else if(a == b || b == c || c == a) {
n = 2;
}else {
n = 3;
}
System.out.println(n);
}
} | 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 = 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 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
if(a==b && b==c) {
System.out.println(1);
}else if(a!=b && b!=c && a!=c) {
System.out.println(3);
}else {
System.out.println(2);
}
}
}
| JAVA |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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;
/**
* https://abc046.contest.atcoder.jp/tasks/abc046_a
*/
public class Main {
public static void main(String[] args) {
Set<Integer> set = new HashSet<>();
Scanner sc = new Scanner(System.in);
set.add(sc.nextInt());
set.add(sc.nextInt());
set.add(sc.nextInt());
sc.close();
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 = input().split()
ans = set(A)
print(len(ans)) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 Auto-generated method stub
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int x=0;
if(a == b){
x++;
}
if(a == c){
x++;
}
if(b == c){
x++;
}
if(x == 3){
System.out.println(1);
}else{
System.out.println(3-x);
}
}
} | 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);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a == b || b == c || c == a)
{
if( a == b && b == c)
{
System.out.println(1);
}else
{
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()
{
unordered_map<int,int> hm;
int a,b,c;
cin>>a>>b>>c;
hm[a]++; hm[b]++; hm[c]++;
cout<<hm.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 | s=map(int,raw_input().split())
s_jufk=list(set(s))
print len(s_jufk) | 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.*;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;
public class Main {
public static int N = 3;
public static void main(String[] args) {
int i,j;
Scanner sc = new Scanner(in);
HashSet<Integer> c = new HashSet<>();
for (i = 0; i < N; i++) {
c.add(parseInt(sc.next()));
}
sc.close();
out.println(c.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;
set<int> st;
int main()
{
for(int i=0;i<3;i++)
{
int x;
cin>>x;
st.insert(x);
}
cout<<st.size()<<endl;
return 0;
} | CPP |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 count = 3;
//判別式
if(a == b){count--;}
if(a == c){count--;}
if(b == c){count--;}
if(a == b && a == c){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 | #include <bits/stdc++.h>
using namespace std;
int a;
set<int> s;
int main(){
for(int i = 0; i < 3; i++){ cin >> a; s.insert(a); }
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 | d = set(map(int, input().split()))
print(len(d)) | 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;
/**
* Created by Taichi1 on 10/22/16.
*/
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
HashSet<Integer> set = new HashSet<>();
while (sc.hasNext()) {
set.add(sc.nextInt());
}
System.out.println(set.size());
}
} | JAVA |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 ans = 3;
if(a==b && b==c)
ans = 1;
else if(a==b || b==c || a==c)
ans = 2;
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 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int count = 1;
if (b != a) {
count += 1;
}
if (c != a && c != b) {
count += 1;
}
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 | l = 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 | #include<bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
set<int> A;
A = {a, b, c};
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 | S = input().split()
ans = len(set(S))
print(ans) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 | se = {int(i) for i in input().split()}
print(len(se)) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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();
if(a == b && b == c){
System.out.println("1");
}else if(a == b || a == c || b == c){
System.out.println("2");
}else{
System.out.println("3");
}
}
} | JAVA |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 | paint = raw_input().split()
ans = 3
if paint[0] == paint[1]:
if paint[1] == paint[2]: ans = 1
else: ans = 2
elif paint[0] == paint[2] or paint[1] == paint[2]: ans = 2
print ans | 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;
cout<<3-(a==b)-(b==c)-(c==a)+(a==b&&b==c)<<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<iostream>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if(a!=b && a!=c && b!=c) cout<<3;
else if(a==b && a==c) cout<<1;
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.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
HashSet<Integer> set = new HashSet<>();
set.add(sc.nextInt());
set.add(sc.nextInt());
set.add(sc.nextInt());
System.out.println(set.size());
}
}
| JAVA |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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;
int ans=1;
if(a!=b)
ans+=1;
if(a!=c&&b!=c)
ans+=1;
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<iostream>
using namespace std;
int main(){
int a,b,c,i;
i=1;
cin >> a >> b >> c;
if(b!=a) i++;
if(c!=a&&c!=b) 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 | L = 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 | #include<iostream>
using namespace std;
int main(void){
int a,b,c,n(1);
cin>>a>>b>>c;
if(b!=a)n++;
if(c!=b && c!=a)n++;
cout<<n<<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 | a = set(map(int,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 | #include<bits/stdc++.h>
using namespace std;
set<int> s;
int a,b,c;
int main(){
cin >> a >> b >> c;
s.insert(a);
s.insert(b);
s.insert(c);
printf("%d",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 | c=list(input().split())
print(len(list(set(c)))) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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(map(int,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 | #include<bits/stdc++.h>
using namespace std;
int main(void) {
int a, b, c;
cin >> a >> b >> c;
set<int> s{a, b, 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>
using namespace std;
set<int> s;
int a,b,c;
int main()
{
cin>>a>>b>>c;
s.insert(a);
s.insert(b);
s.insert(c);
cout<<s.size();
return 0;
} | CPP |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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(int,raw_input().split(" ")))) | PYTHON |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 sc = new Scanner(System.in);
HashSet<String> set = new HashSet<String>();
for(int idx = 0; idx < 3; idx++) {
String num = sc.next();
set.add(num);
}
System.out.println(set.size());
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.*;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
int ans;
if(a == b && a == c){
ans = 1;
}else if(a != b && a != c && b != c){
ans = 3;
}else{
ans = 2;
}
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 | import java.util.*;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
long result = Stream.of(a, b, c).distinct().count();
System.out.println(result);
}
}
| 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 | s = set(input().split())
N = len(s)
print(N) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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();
if(a==b&&a==c)System.out.println(1);
else if(a==b||a==c||b==c)System.out.println(2);
else System.out.println(3);
}
} | JAVA |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 = 0;
if(a == b) {
if(b == c) ans = 1;
else ans = 2;
}else if(b == c) {
ans = 2;
}else if(a == c){
ans = 2;
}else {
ans = 3;
}
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 | from random import random
import math
import re
import fractions
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 | #include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main()
{
cin>>a>>b>>c;
if(a==b&&b==c)cout<<1<<endl;
else if(a==b||b==c||a==c)cout<<2<<endl;
else cout<<3<<endl;
} | CPP |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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;
bool use[110];
int main(){
int i=3,x,ans=0;
while(i>0){
cin>>x;if(!use[x])++ans;
use[x]=true;--i;
}
cout<<ans<<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<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<(3-(a==b)-(b==c)-(c==a)+(a==b&&b==c))<<endl;
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 | l=map(int, raw_input().split())
col=1
if l[1]!=l[0]:
col+=1
if l[2]!=l[1] and l[2]!=l[0]:
col+=1
print col | 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 <iostream>
#include <map>
using namespace std;
int main(){
map<int,int> s;
int a;
for(int i=0;i<3;i++){
cin>>a;
s[a]=1;
}
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>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
printf(a==b && b==c && c==a?"1":c==a || a==b || 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 <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int x = (a != b) + (b != c) + (c != a) + (a == b && b == c);
cout << x;
} | 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 = list(map(int, input().split()))
print(len(set(A))) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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.*;
// UVa 11504
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
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 | 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 | print(len(set([int(i) for i in input().split()]))) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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=input().split()
print(len(set(a))) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 | # -*- coding:utf-8 -*-
# get numbers
set_of_cans = set(map(int, raw_input().split()))
print len(set_of_cans)
| 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 | st=set(input().split())
print(len(st)) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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(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 | cans = set(map(int, raw_input().split()))
print len(cans) | 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 | list = (input().split())
A=set(list)
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 | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int ans=1;
if(b!=a) ans++;
if(c!=a && c!=b) ans++;
cout << ans <<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>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){
int a,b,c; cin>>a>>b>>c;
cout<<set<int>({a,b,c}).size()<<'\n';
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,ans=3;
cin>>a>>b>>c;
if(a==b)ans--;
if(b==c)ans--;
if(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 | import java.util.Scanner;
import java.util.stream.IntStream;
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();
System.out.println(solve(a, b, c));
sc.close();
}
static int solve(int a, int b, int c) {
return (int) IntStream.of(a, b, c).distinct().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;
//import java.util.Arrays;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int count = 3;
if(a == b) count--;
if(a == c) count--;
if(b == c) count--;
if(count == 0) count = 1;
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 | lst = list(input().split())
print(len(set(lst))) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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;
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 | #include<bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, ct = 1; cin >> a >> b >> c;
if(a != b) ct++; if(a != c && b != c) ct++;
cout << ct << 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() {
set<int> s;
for ( int i=0; i<3; i++ ) {
int a;
cin >> a;
s.insert(a);
}
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 | #ABC046A
s=set(raw_input().split())
print len(s)
| PYTHON |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 << (3 - (a == b || b == c || c == a) - (a == b && b == c)) << 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 | answer_set=set(input().split())
print(len(answer_set)) | 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 cnt = 3;
int a = sc.nextInt();
int b = sc.nextInt();
if (a == b) {
cnt--;
}
int c = sc.nextInt();
if (a == c || b == c) {
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>
using namespace std;
int a, b, c, s=3;
int main() {
cin>>a>>b>>c;
if(a==b && b==c) s=1;
else if(a==b || b==c || c==a) s=2;
cout<<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 | A = set(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 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner num = new Scanner(System.in);
int a = num.nextInt();
int b = num.nextInt();
int c = num.nextInt();
if (a == b & b == c) {
System.out.println("1");
} else if ((a == b & b != c) | (a == c & c != b) | (b == c & c != a)) {
System.out.println("2");
} else {
System.out.println("3");
}
num.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.Scanner;
public class Main
{
public static void main(String[] args)
{
//入力
Scanner stdin = new Scanner(System.in);
int a = stdin.nextInt();
int b = stdin.nextInt();
int c = stdin.nextInt();
//処理
if ((a == b) && (b == c))
{
System.out.println("1");
} else if ((a == b) || (a == c) || (b == c))
{
System.out.println("2");
} else
{
System.out.println("3");
}
}
}
| JAVA |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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([x for x 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 | #include<bits/stdc++.h>
using namespace std;
int a;
set<int>s;
int main(){
for(int i=0;i<3;i++){cin>>a;s.insert(a);}
cout<<s.size()<<endl;
}
| CPP |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 () {
set<int> s;
for (int i=0;i<3;i++) {
int a; cin >> a;
s.insert(a);
}
cout << s.size() << endl;
} | CPP |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if (a == b && a == c)
System.out.println(1);
else if ((a == b && a != c) || (a == c && a != b) || (b == c && a != b))
System.out.println(2);
else
System.out.println(3);
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,m=1;
cin >> a >> b >> c;
if(a!=b) m++;
if(a!=c&&b!=c) m++;
cout << m << 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 | a=set(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 | #include <iostream>
#include <set>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
set<int> st {a, b, c};
cout << st.size() << endl;
return 0;
} | CPP |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 = set(int(i) for i in 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 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
HashSet<Integer> set = new HashSet<Integer>();
for(int i = 0; i < 3; i++) {
set.add(sc.nextInt());
}
System.out.println(set.size());
}
} | JAVA |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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())
cnt = 3
if a == b:
cnt-=1
if b == c:
cnt-=1
if a == c:
cnt-=1
if cnt==0:
cnt=1
print cnt
| PYTHON |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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;
for (int i = 0;i<3;++i) {
int num;
cin >> num;
S.insert(num);
}
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 | print(len(set([x for x in input().split()]))) | PYTHON3 |
p03962 AtCoder Beginner Contest 046 - AtCoDeer and Paint Cans | AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he 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 | #046_A
s=input().split()
print(len(set(s))) | PYTHON3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.