1 条题解
-
0
C :
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <time.h> int main() { // freopen("in","r",stdin); // freopen("out","w",stdout); int x = 0; do{ x++; } while (!(x%2==1 && x%3==2 && x%5==4 && x%6==5 && x%7==0)); printf("%d\n", x); return 0; }
C++ :
#include<stdio.h> int main() { int all,step1 = 2,step2 = 3,step3 = 5,step4 = 6,step5 = 7; for(all = 7;;all++) { if(all%step1 == 1 && all%step2 == 2 && all%step3 == 4 && all%step4 == 5 && all%step5 == 0) { printf("%d\n",all); break; } } return 0; }
- 1
信息
- ID
- 3368
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者