- 捕风捉影
- 2016-05-07 20:30:12 @
额,本来已经做出来时,却突然看到了月薪(1000000000000000000000000000000000000000000 MOD 10 )元!立马就觉得做这题一点意义都没有,(1000000000000000000000000000000000000000000 MOD 10 )元=0元。。。(1000000000000000000000000000000000000000000除以10的余数)
5 条评论
-
刘锦钰是超神 LV 8 @ 2016-10-19 14:03:55
include <bits/stdc++.h>
bool check(int x) {
int len = 0,b = x,c = x;
for (;b;len++) b /= 10;
if(!len%2) return false;
int a[101];
if (!x%2) return false;
memset(a,0,sizeof(a));
for(int i = 1;i <= len;i++) {
a[i] = x%10;
x /= 10;
}
for (int i = 1;i <= (len+1)/2;i++)
if (a[i] != a[len+1-i]) return false;
for (int i = 2;i <= sqrt(c);i++)
if(c%i==0) return false;
return true;
}
int main() {
int L,R;
scanf("%d%d",&L,&R);
R = std :: min(R,10000000);
for (int i = L;i <= R;i++)
if (check(i)) printf("%d\n",i);
return 0;
} -
2016-10-05 19:12:27@
这是搞事情(滑稽)为什么还会有人在这鬼地方待下去
-
2016-08-21 17:02:26@
#include <bits/stdc++.h>
bool check(int x) {
int len = 0,b = x,c = x;
for (;b;len++) b /= 10;
if(!len%2) return false;
int a[101];
if (!x%2) return false;
memset(a,0,sizeof(a));
for(int i = 1;i <= len;i++) {
a[i] = x%10;
x /= 10;
}
for (int i = 1;i <= (len+1)/2;i++)
if (a[i] != a[len+1-i]) return false;
for (int i = 2;i <= sqrt(c);i++)
if(c%i==0) return false;
return true;
}
int main() {
int L,R;
scanf("%d%d",&L,&R);
R = std :: min(R,10000000);
for (int i = L;i <= R;i++)
if (check(i)) printf("%d\n",i);
return 0;
} -
2016-05-07 20:31:58@
坑啊。
-
2016-05-07 20:31:41@
编译成功
测试数据 #0: Accepted, time = 15 ms, mem = 556 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 552 KiB, score = 10
测试数据 #2: Accepted, time = 15 ms, mem = 556 KiB, score = 10
测试数据 #3: Accepted, time = 31 ms, mem = 560 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 556 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 556 KiB, score = 10
测试数据 #6: Accepted, time = 343 ms, mem = 556 KiB, score = 10
测试数据 #7: Accepted, time = 296 ms, mem = 556 KiB, score = 10
测试数据 #8: Accepted, time = 0 ms, mem = 556 KiB, score = 10
测试数据 #9: Accepted, time = 343 ms, mem = 556 KiB, score = 10
Accepted, time = 1043 ms, mem = 560 KiB, score = 100
- 1