题解 | #牛牛的二三七整除#
牛牛的二三七整除
http://www.nowcoder.com/practice/b2cf0b791245436f8f0591ae9f4c664f
#include<stdio.h>
int main() {
int a;
scanf("%d", &a);
if (!(a % 2) || !(a % 3) || !(a % 7)) {
if(!(a % 2)) printf("2 ");
if(!(a % 3)) printf("3 ");
if(!(a % 7)) printf("7 ");
}
else printf("n ");
return 0;
}
int main() {
int a;
scanf("%d", &a);
if (!(a % 2) || !(a % 3) || !(a % 7)) {
if(!(a % 2)) printf("2 ");
if(!(a % 3)) printf("3 ");
if(!(a % 7)) printf("7 ");
}
else printf("n ");
return 0;
}