-->
当前位置:首页 > 题库

PROGRAMMING:Multiple of 3

Luz5年前 (2021-05-10)题库394
Give you a positive integer, please judge whether it is a multiple of 3?
###Input format:
The input data has a t (T < = 50), which means there are t groups of data
For each group of data, an integer n * * (1 < = n < = $$10 ^ {1000} $$) is used to note the data range**
***This problem needs to know the special property that a number can be divided by 3, that is, if the sum of each digit can be divided by 3, the number can be divided by 3***
###Output format:
For each group of data, output a line of "yes" or "no" (excluding quotation marks), which means that the number is or is not a multiple of 3
###Input example:
Here is a set of inputs. For example:
```in
two
thirty-three thousand three hundred and thirty-two
one hundred and twenty-three
```
###Output example:
The corresponding output is given here. For example:
```out
NO
YES
```







answer:If there is no answer, please comment