UberOA #64
Valid String Check
估计简单可在线判题
Determine whether the integer represented by a digit string is divisible by 3 and the character 7 appears at least twice. Both conditions must hold.
This site has made the standard input and output explicit.
输入格式
One line containing a non-empty digit string, which may have leading 0s. On this site the length is 1..1000000.
输出格式
Output one integer, the answer.
样例 1
输入:
771
输出:
1
样例 2
输入:
777
输出:
1
样例 3
输入:
171
输出:
0
样例说明
Example 1: 7+7+1=15 and there are two 7s, so output 1. Example 2: the digit sum is 21 and there are three 7s, so output 1. Example 3: the digit sum 9 is divisible by 3, but there is only one 7, so output 0.