=======[cyj0.out]========= Expected | Yours 1 | 1 1 \ 1 ============================== ========[cyj1.out]========= Expected | Yours 1 2 3 4 5 6 8 9 10 12 | 1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 | 15 16 18 20 24 25 16 \ 16 ============================== ========[cyj2.out]========= Expected |
```c #include <stdio.h> int isUgly(int num) { if (num <= 0) return 0; while (num % 2 == 0) num /= 2; while (num % 3 == 0) num /= 3; while (num % 5 == 0) num /= 5; return num == 1; } int main() { int n; scanf("%d", &n); int count = 0; int lineCount = 0; for (int i = 1; i <= n; i++) { if (isUgly(i)) { printf("%6d", i); count++; lineCount++; if (lineCount == 10) { printf("\n"); lineCount = 0; } } } if (lineCount > 0) { printf("\n"); } printf("%d\n", count); return 0; } ``` [2026-01-12 17:56:45 | AI问答 | 221点数解答]
相关提问
- [DeepSeek] =======[cyj0.out]========= Expected | Yours 1 | 1 1 \ 1 ============================== ========[cyj1.out]========= Expected | Yours 1 2 3 4 5 6 8 9 10 12 | 1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 | 15 16 18 20 24 25 16 \ 16 ============================== ========[cyj2.out]========= Expected | (221点数解答 | 2026-01-12 17:56:45)26
- [阿里通义] ========[cyj0.out]========= Expected | Yours 1 | 1 1 \ 1 ============================== ========[cyj1.out]========= Expected | Yours 1 2 3 4 5 6 8 9 10 12 | 1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 | 15 16 18 20 24 25 16 \ 16 ============================== ========[cyj2.out]========= Expected |(1192点数解答 | 2026-01-14 12:26:46)37
- [阿里通义] ========[cyj0.out]========= Expected | Yours 1 | 1 1 \ 1 ============================== ========[cyj1.out]========= Expected | Yours 1 2 3 4 5 6 8 9 10 12 | 1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 | 15 16 18 20 24 25 16 \ 16 ============================== ========[cyj2.out]========= Expected |(720点数解答 | 2026-01-14 12:28:54)18
- [阿里通义] ========[cyj0.out]========= Expected | Yours 1 | 1 1 \ 1 ============================== ========[cyj1.out]========= Expected | Yours 1 2 3 4 5 6 8 9 10 12 | 1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 | 15 16 18 20 24 25 16 \ 16 ============================== ========[cyj2.out]========= Expected |(1146点数解答 | 2026-01-14 12:33:46)33
- [阿里通义] ========[cyj0.out]========= Expected | Yours 1 | 1 1 \ 1 ============================== ========[cyj1.out]========= Expected | Yours 1 2 3 4 5 6 8 9 10 12 | 1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 | 15 16 18 20 24 25 16 \ 16 ============================== ========[cyj2.out]========= Expected |(1030点数解答 | 2026-01-14 12:35:51)18
- [阿里通义] ========[cyj01.out]========= Expected | Yours 27604 | 11972450 ============================== ========[cyj02.out]========= Expected | Yours 5289 | 530127 ============================== ========[cyj03.out]========= Expected | Yours 343 | 12817 ============================== ========[cyj04.out]========= Expected | Yours 1403 | 1048464 ============================== ========[cyj05.out]========= Expected (1107点数解答 | 2026-01-08 12:17:38)19
- [阿里通义] ========[cyj01.out]========= Expected | Yours 27604 | 11972450 ============================== ========[cyj02.out]========= Expected | Yours 5289 | 530127 ============================== ========[cyj03.out]========= Expected | Yours 343 | 12817 ============================== ========[cyj04.out]========= Expected | Yours 1403 | 1048464 ============================== ========[cyj05.out]========= Expected (1316点数解答 | 2026-01-08 12:18:39)25
- [阿里通义] ========[cyj01.out]========= Expected | Yours 27604 | 11972450 ============================== ========[cyj02.out]========= Expected | Yours 5289 | 530127 ============================== ========[cyj03.out]========= Expected | Yours 343 | 12817 ============================== ========[cyj04.out]========= Expected | Yours 1403 | 1048464 ============================== ========[cyj05.out]========= Expected (980点数解答 | 2026-01-08 12:21:23)20
- [阿里通义] wangyc 错误信息 ========[cyj01.out]========= Expected | Yours 27604 | 11972450 ============================== ========[cyj02.out]========= Expected | Yours 5289 | 530127 ============================== ========[cyj03.out]========= Expected | Yours 343 | 12817 ============================== ========[cyj04.out]========= Expected | Yours 1403 | 1048464 ============================== ========[cyj05.out]====(1482点数解答 | 2026-01-08 12:25:33)28
- [阿里通义] 错误信息 ========[cyj01.out]========= Expected | Yours 27604 | 11972450 ============================== ========[cyj02.out]========= Expected | Yours 5289 | 530127 ============================== ========[cyj03.out]========= Expected | Yours 343 | 12817 ============================== ========[cyj04.out]========= Expected | Yours 1403 | 1048464 ============================== ========[cyj05.out]========= Exp(1808点数解答 | 2026-01-08 12:28:14)22
- [DeepSeek] 题目描述 输入四个整数 x , y , a , b x,y,a,b,请你按照要求输出 x ∼ y x∼y 之间的所有数。 要求: 不要输出数字 a a。 不要输出大于等于数字 b b 的数。 输入格式 输入包括一行,包含四个整数 x , y , a , b x,y,a,b,数字之间用空格隔开。 输出格式 输出包括一行,为 x ∼ y x∼y 之间符合要求的数字。 input1 复制 10 20 13 17 output1 复制 10 11 12 14 15 16 input2 复制 50 55 52 100 output2 复制 50 51 53 54 55 样例解释 对于样例 1 1: 样例要求输出 10 ∼ 20 10∼20 之间不是 13 13, 且小于 17 17 的数,故有 10 , 11 , 12 , 14 , 15 , 16 10,11,12,14,15,16。 数据规模与约定 对于 100 % 100% 的数据, 1 ≤ x ≤ y ≤ 100 1≤x≤y≤100, x ≤ a ≤ y x≤a≤y, x ≤ b x≤b。 C++程序(138点数解答 | 2025-07-19 20:44:46)324
- [字节豆包] 题目描述 输入四个整数 x , y , a , b x,y,a,b,请你按照要求输出 x ∼ y x∼y 之间的所有数。 要求: 不要输出数字 a a。 不要输出大于等于数字 b b 的数。 输入格式 输入包括一行,包含四个整数 x , y , a , b x,y,a,b,数字之间用空格隔开。 输出格式 输出包括一行,为 x ∼ y x∼y 之间符合要求的数字。 input1 复制 10 20 13 17 output1 复制 10 11 12 14 15 16 input2 复制 50 55 52 100 output2 复制 50 51 53 54 55 样例解释 对于样例 1 1: 样例要求输出 10 ∼ 20 10∼20 之间不是 13 13, 且小于 17 17 的数,故有 10 , 11 , 12 , 14 , 15 , 16 10,11,12,14,15,16。 数据规模与约定 对于 100 % 100% 的数据, 1 ≤ x ≤ y ≤ 100 1≤x≤y≤100, x ≤ a ≤ y x≤a≤y, x ≤ b x≤b。c++ (304点数解答 | 2025-10-25 20:12:27)71