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

PROGRAMMING:Judge whether it can be divided by 3, 5, 7

Luz5年前 (2021-05-10)题库401
###Task description
```
Given an integer, judge whether it can be divided by 3, 5, 7, and output the following information:
1. It can be divided by 3, 5 and 7 at the same time (output 3, 5 and 7 directly, with a space in the middle of each number);
2. It can only be divided by two of them (output two numbers, the small one in the front and the large one in the back). For example: 3 5 or 3 7 or 5 7, separated by a space in the middle);
3. It can only be divided by one of the numbers (output this number);
4. It can't be divided by any number in 3, 5 and 7, and output lowercase character 'n', excluding single quotation marks.
```
###Input format:
Enter a line, including an integer.
###Output format:
Output a line, according to the description requirements, give the integer is divided by 3, 5, 7.
###Input sample 1:
```in
one hundred and five
```
###Output sample 1:
```out
3 5 7
```
###Input sample 2:
```in
fifteen
```
###Output sample 2:
```out
3 5
```
###Input sample 3:
```in
seventeen
```
###Output sample 3:
```out
n
```
###Title Source
This topic is selected from openjudge website http://noi.openjudge.cn/ch0104/09/ .







answer:If there is no answer, please comment