3 solutions
-
0
#include <stdio.h> int main() { int num; scanf("%d", &num); if (num % 3 == 0 && num % 5 == 0 && num % 7 == 0) { printf("3 5 7 "); } else if (num % 3 == 0 && num % 5 == 0) { printf("3 5 "); } else if (num % 3 == 0 && num % 7 == 0) { printf("3 7 "); } else if (num % 5 == 0 && num % 7 == 0) { printf("5 7 "); } else if (num % 3 == 0) { printf("3 "); } else if (num % 5 == 0) { printf("5 "); } else if (num % 7 == 0) { printf("7 "); } else { printf("n "); } return 0; }
我这个又臭又长
- 1
Information
- ID
- 6742
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 6
- Tags
- (None)
- # Submissions
- 262
- Accepted
- 84
- Uploaded By