Problem Statement
AtCoDeer recently bought three paint cans. The colors of the cans are represented by integers between 1 and 100, inclusive:
The color of the can bought two days ago is represented by a.
The color of the can bought yesterday is represented by b.
The color of the can bought today is represented by c.
Your task is to count the number of distinct colors among the three cans.
Two skills required
The original algorithmic requirement: count how many distinct values among a, b, c.
File I/O requirement: read the three integers from a file named input.txt and write the resulting count to a file named output.txt. The solution must be placed in the /app/ directory.
Input Format
The file input.txt contains three integers a, b, and c (1 ≤ a, b, c ≤ 100), separated by spaces and/or newlines.
Output Format
The file output.txt must contain a single integer representing the number of different colors.
Notes
Place the solution in the /app/ directory.
Examples
Example 1
Input file: input.txt
1 2 3
Output file: output.txt
3
Explanation: All three cans are different colors.
Example 2
Input file: input.txt
1 1 2
Output file: output.txt
2
Explanation: There are two distinct colors: 1 and 2.
Example 3
Input file: input.txt
2 2 2
Output file: output.txt
1
Explanation: All cans are the same color.