191 条题解
-
0gsrq LV 10 @ 2009-07-06 12:09:48
挂表程序
var
i:longint;
j:integer;
function ss(i:longint):boolean;
var
k:longint;
begin
ss:=true;
for k:=2 to round(sqrt(i)) do
begin
if i mod k=0 then
begin
ss:=false;
exit;
end;
end;
end;
function hw(i:longint):boolean;
var
s:string;
m,n:integer;
begin
hw:=false;
str(i,s);
m:=1;
n:=length(s);
while (s[m]=s[n]) and (m=n then hw:=true;
end;
{---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|}
begin
assign(output,'output.out');
rewrite(output);
j:=0;
for i:=5 to 9989899 do
if ss(i) and hw(i) then
begin
writeln(i,',');
j:=j+1;
end;
writeln;
writeln(j);
close(output);
end. -
02009-07-05 12:01:17@
可以先自己打个表……先枚举10^9以内的回文数再判断他们是否是素数。然后生成表……写完程序就一次AC了!
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms打表过……
程序很简单,就是有点BT的长……
const
huisu:array[1..779]of longint=(5,
7,
11,
101,
131,
151,
181,
191,
313,
353,
373,
383,
727,
757,
787,
797,
919,
929,
10301,
10501,
10601,
11311,
11411,
12421,
12721,
12821,
13331,
13831,
13931,
14341,
14741,
15451,
15551,
16061,
16361,
16561,
16661,
17471,
17971,
18181,
18481,
19391,
19891,
19991,
30103,
30203,
30403,
30703,
30803,
31013,
31513,
32323,
32423,
33533,
34543,
34843,
35053,
35153,
35353,
35753,
36263,
36563,
37273,
37573,
38083,
38183,
38783,
39293,
70207,
70507,
70607,
71317,
71917,
72227,
72727,
73037,
73237,
73637,
74047,
74747,
75557,
76367,
76667,
77377,
77477,
77977,
78487,
78787,
78887,
79397,
79697,
79997,
90709,
91019,
93139,
93239,
93739,
94049,
94349,
94649,
94849,
94949,
95959,
96269,
96469,
96769,
97379,
97579,
97879,
98389,
98689,
1003001,
1008001,
1022201,
1028201,
1035301,
1043401,
1055501,
1062601,
1065601,
1074701,
1082801,
1085801,
1092901,
1093901,
1114111,
1117111,
1120211,
1123211,
1126211,
1129211,
1134311,
1145411,
1150511,
1153511,
1160611,
1163611,
1175711,
1177711,
1178711,
1180811,
1183811,
1186811,
1190911,
1193911,
1196911,
1201021,
1208021,
1212121,
1215121,
1218121,
1221221,
1235321,
1242421,
1243421,
1245421,
1250521,
1253521,
1257521,
1262621,
1268621,
1273721,
1276721,
1278721,
1280821,
1281821,
1286821,
1287821,
1300031,
1303031,
1311131,
1317131,
1327231,
1328231,
1333331,
1335331,
1338331,
1343431,
1360631,
1362631,
1363631,
1371731,
1374731,
1390931,
1407041,
1409041,
1411141,
1412141,
1422241,
1437341,
1444441,
1447441,
1452541,
1456541,
1461641,
1463641,
1464641,
1469641,
1486841,
1489841,
1490941,
1496941,
1508051,
1513151,
1520251,
1532351,
1535351,
1542451,
1548451,
1550551,
1551551,
1556551,
1557551,
1565651,
1572751,
1579751,
1580851,
1583851,
1589851,
1594951,
1597951,
1598951,
1600061,
1609061,
1611161,
1616161,
1628261,
1630361,
1633361,
1640461,
1643461,
1646461,
1654561,
1657561,
1658561,
1660661,
1670761,
1684861,
1685861,
1688861,
1695961,
1703071,
1707071,
1712171,
1714171,
1730371,
1734371,
1737371,
1748471,
1755571,
1761671,
1764671,
1777771,
1793971,
1802081,
1805081,
1820281,
1823281,
1824281,
1826281,
1829281,
1831381,
1832381,
1842481,
1851581,
1853581,
1856581,
1865681,
1876781,
1878781,
1879781,
1880881,
1881881,
1883881,
1884881,
1895981,
1903091,
1908091,
1909091,
1917191,
1924291,
1930391,
1936391,
1941491,
1951591,
1952591,
1957591,
1958591,
1963691,
1968691,
1969691,
1970791,
1976791,
1981891,
1982891,
1984891,
1987891,
1988891,
1993991,
1995991,
1998991,
3001003,
3002003,
3007003,
3016103,
3026203,
3064603,
3065603,
3072703,
3073703,
3075703,
3083803,
3089803,
3091903,
3095903,
3103013,
3106013,
3127213,
3135313,
3140413,
3155513,
3158513,
3160613,
3166613,
3181813,
3187813,
3193913,
3196913,
3198913,
3211123,
3212123,
3218123,
3222223,
3223223,
3228223,
3233323,
3236323,
3241423,
3245423,
3252523,
3256523,
3258523,
3260623,
3267623,
3272723,
3283823,
3285823,
3286823,
3288823,
3291923,
3293923,
3304033,
3305033,
3307033,
3310133,
3315133,
3319133,
3321233,
3329233,
3331333,
3337333,
3343433,
3353533,
3362633,
3364633,
3365633,
3368633,
3380833,
3391933,
3392933,
3400043,
3411143,
3417143,
3424243,
3425243,
3427243,
3439343,
3441443,
3443443,
3444443,
3447443,
3449443,
3452543,
3460643,
3466643,
3470743,
3479743,
3485843,
3487843,
3503053,
3515153,
3517153,
3528253,
3541453,
3553553,
3558553,
3563653,
3569653,
3586853,
3589853,
3590953,
3591953,
3594953,
3601063,
3607063,
3618163,
3621263,
3627263,
3635363,
3643463,
3646463,
3670763,
3673763,
3680863,
3689863,
3698963,
3708073,
3709073,
3716173,
3717173,
3721273,
3722273,
3728273,
3732373,
3743473,
3746473,
3762673,
3763673,
3765673,
3768673,
3769673,
3773773,
3774773,
3781873,
3784873,
3792973,
3793973,
3799973,
3804083,
3806083,
3812183,
3814183,
3826283,
3829283,
3836383,
3842483,
3853583,
3858583,
3863683,
3864683,
3867683,
3869683,
3871783,
3878783,
3893983,
3899983,
3913193,
3916193,
3918193,
3924293,
3927293,
3931393,
3938393,
3942493,
3946493,
3948493,
3964693,
3970793,
3983893,
3991993,
3994993,
3997993,
3998993,
7014107,
7035307,
7036307,
7041407,
7046407,
7057507,
7065607,
7069607,
7073707,
7079707,
7082807,
7084807,
7087807,
7093907,
7096907,
7100017,
7114117,
7115117,
7118117,
7129217,
7134317,
7136317,
7141417,
7145417,
7155517,
7156517,
7158517,
7159517,
7177717,
7190917,
7194917,
7215127,
7226227,
7246427,
7249427,
7250527,
7256527,
7257527,
7261627,
7267627,
7276727,
7278727,
7291927,
7300037,
7302037,
7310137,
7314137,
7324237,
7327237,
7347437,
7352537,
7354537,
7362637,
7365637,
7381837,
7388837,
7392937,
7401047,
7403047,
7409047,
7415147,
7434347,
7436347,
7439347,
7452547,
7461647,
7466647,
7472747,
7475747,
7485847,
7486847,
7489847,
7493947,
7507057,
7508057,
7518157,
7519157,
7521257,
7527257,
7540457,
7562657,
7564657,
7576757,
7586857,
7592957,
7594957,
7600067,
7611167,
7619167,
7622267,
7630367,
7632367,
7644467,
7654567,
7662667,
7665667,
7666667,
7668667,
7669667,
7674767,
7681867,
7690967,
7693967,
7696967,
7715177,
7718177,
7722277,
7729277,
7733377,
7742477,
7747477,
7750577,
7758577,
7764677,
7772777,
7774777,
7778777,
7782877,
7783877,
7791977,
7794977,
7807087,
7819187,
7820287,
7821287,
7831387,
7832387,
7838387,
7843487,
7850587,
7856587,
7865687,
7867687,
7868687,
7873787,
7884887,
7891987,
7897987,
7913197,
7916197,
7930397,
7933397,
7935397,
7938397,
7941497,
7943497,
7949497,
7957597,
7958597,
7960697,
7977797,
7984897,
7985897,
7987897,
7996997,
9002009,
9015109,
9024209,
9037309,
9042409,
9043409,
9045409,
9046409,
9049409,
9067609,
9073709,
9076709,
9078709,
9091909,
9095909,
9103019,
9109019,
9110119,
9127219,
9128219,
9136319,
9149419,
9169619,
9173719,
9174719,
9179719,
9185819,
9196919,
9199919,
9200029,
9209029,
9212129,
9217129,
9222229,
9223229,
9230329,
9231329,
9255529,
9269629,
9271729,
9277729,
9280829,
9286829,
9289829,
9318139,
9320239,
9324239,
9329239,
9332339,
9338339,
9351539,
9357539,
9375739,
9384839,
9397939,
9400049,
9414149,
9419149,
9433349,
9439349,
9440449,
9446449,
9451549,
9470749,
9477749,
9492949,
9493949,
9495949,
9504059,
9514159,
9526259,
9529259,
9547459,
9556559,
9558559,
9561659,
9577759,
9583859,
9585859,
9586859,
9601069,
9602069,
9604069,
9610169,
9620269,
9624269,
9626269,
9632369,
9634369,
9645469,
9650569,
9657569,
9670769,
9686869,
9700079,
9709079,
9711179,
9714179,
9724279,
9727279,
9732379,
9733379,
9743479,
9749479,
9752579,
9754579,
9758579,
9762679,
9770779,
9776779,
9779779,
9781879,
9782879,
9787879,
9788879,
9795979,
9801089,
9807089,
9809089,
9817189,
9818189,
9820289,
9822289,
9836389,
9837389,
9845489,
9852589,
9871789,
9888889,
9889889,
9896989,
9902099,
9907099,
9908099,
9916199,
9918199,
9919199,
9921299,
9923299,
9926299,
9927299,
9931399,
9932399,
9935399,
9938399,
9957599,
9965699,
9978799,
9980899,
9981899,
9989899);
var
i,n,m:longint;
begin
read(n,m);
for i:=1 to 779 do
if (huisu[i]=n) then writeln(huisu[i]);
end. -
02009-07-03 12:47:43@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 666ms
├ 测试数据 08:答案正确... 650ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 697ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:2013ms发出来倒架子。。。
不过毕竟是我第100题。。。 -
02009-06-26 19:33:56@
var
na:array[1..10] of string;
ans:array[1..10] of integer;
i,j,k,np,s,x,p,q:integer;
m,n:string;
begin
fillchar(ans,sizeof(ans),0);
readln(np);
for i:=1 to np do readln(na[i]);
for i:=1 to np do
begin
readln(m);
for j:=1 to np do if na[j]=m then begin p:=j; break; end;
readln(s,x);
if x0 then
begin
ans[p]:=ans[p]-(s div x)*x;
for j:=1 to x do begin
readln(n);
for k:=1 to np do if na[k]=n then q:=k;
ans[q]:=ans[q]+s div x;
end;
end
else ans[p]:=ans[p]+s;
end;
for i:=1 to np do writeln(na[i],' ',ans[i]);
end. -
02009-05-26 09:38:05@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms -
02009-05-15 17:20:43@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms枚举结果。
-
02009-05-10 09:30:51@
1074ms AC 汗!
都是一个循环,然后先判断是否为奇数位
再判断回文,
后素数······ -
02009-05-05 20:43:00@
var
na:array[1..10] of string;
ans:array[1..10] of integer;
i,j,k,np,s,x,p,q:integer;
m,n:string;
begin
fillchar(ans,sizeof(ans),0);
readln(np);
for i:=1 to np do readln(na[i]);
for i:=1 to np do
begin
readln(m);
for j:=1 to np do if na[j]=m then begin p:=j; break; end;
readln(s,x);
if x0 then
begin
ans[p]:=ans[p]-(s div x)*x;
for j:=1 to x do begin
readln(n);
for k:=1 to np do if na[k]=n then q:=k;
ans[q]:=ans[q]+s div x;
end;
end
else ans[p]:=ans[p]+s;
end;
for i:=1 to np do writeln(na[i],' ',ans[i]);
end.
还算短吧... -
02009-05-02 18:40:23@
program vijos1042;
var ac,bc,a,vt,code,s,m,n,i:longint;
ss:string;
function st(vi:longint):boolean;
var i,j:longint;
begin
st:=true;
for i:=2 to trunc(sqrt(vi)) do
begin
if vi mod i =0 then
begin
st:=false;
break;
end;
end;
end;
begin
readln(ac,bc);
if bc>9989899 then
bc:=9989899;
for i:=ac to bc do
begin
if (i div 30) then
if (i div 50) thenif odd(i) then begin
str(i,ss);
m:=length(ss);
s:=m div 2;
for n:=1 to m div 2 do
if ss[n]=ss[m-n+1] then dec(s);
if s=0 then val(ss,vt,code);if (s=0) and (st(vt)=true) then
begin
inc(a);
writeln(ss);
end;
end;
end;
readln;
readln;
end.
1044ms AC -
02009-06-06 11:29:05@
var m,n,i:longint;
function hws(vi:longint):boolean;
var i,j:longint;
s:string;
begin
str(vi,s);
i:=length(s);
if i=1 then
hws:=true
else
begin
hws:=true;
for j:=1 to i div 2 do
begin
if copy(s,j,1)copy(s,i-j+1,1) then
begin
hws:=false;
break;
end;
end;
end;
end;function ss(vi:longint):boolean;
var i,j:longint;
begin
ss:=true;
for i:=2 to trunc(sqrt(vi)) do
begin
if vi mod i =0 then
begin
ss:=false;
break;
end;
end;
end;begin
readln(m,n);
for i:=m to n do
begin
if i>1000000 then break;
if odd(i) then
if hws(i) then
begin
if ss(i) then
writeln(i);
end;
end;
end.
刚好压线!! -
02009-04-13 10:06:07@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 291ms
├ 测试数据 08:答案正确... 259ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 291ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:841ms下面有哪位不是打表的秒杀的?
-
02009-04-03 08:09:11@
交USACO的程序,结果卡了评测机。。。我无语。
-
02009-04-02 21:16:41@
USACO原题.
显然在回文中找素数。
偶数位的除了11外都不可能是素数,所以~ -
02009-03-04 16:59:36@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 525ms
├ 测试数据 06:答案正确... 509ms
├ 测试数据 07:答案正确... 728ms
├ 测试数据 08:答案正确... 634ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 509ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:2905ms
第一次自己10分钟写完就过了的题(A+B除外) -
02009-02-03 16:33:12@
构造回文数,再判断质数即可。
-
02009-02-02 21:02:21@
难道这里的都不做USACO??
section1里面的原题,有两个hint,简单的不行......
先用i:1~9
j:0~9
......
构造回文数
然后判断是否为质数,Dolphin全部0ms -
02009-01-31 18:50:34@
#include
#include
_Bool isprime(int n) {
int i,p;
if(n2) return 0;
for(p=(int)sqrt(n),i=3;ip;
}
int getnum(int highpart,int digits) {
char arr[10];
int mid,i;
sprintf(arr,"%d",highpart);
arr[digits]=0;
mid=digits-1>>1;
for(i=digits-1;i>mid;arr[i]=arr[mid*2-i+!(digits&1)],i--);
sscanf(arr,"%d",&i);
return i;
}
int main() {
int m,n,mdigit,ndigit,i,j,jto,num;
scanf("%d%d",&m,&n);
mdigit=(int)log10(m)+1,ndigit=(int)log10(n)+1;
for(i=mdigit;i>1),jto=j*10;jn) break;
if(num>=m&&isprime(num)) printf("%d\n",num);
}
return 0;
}编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms注意:偶数位回文数都能被11整除...
-
02009-01-28 13:08:05@
偶数位回文数只有11是质数,这个可以降低构造回文数的工程量。
-
02009-01-20 11:46:25@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msvar
a:array[1..1000]of longint;
i,j,k,m,n:longint;
begin
a[1]:=2;
a[2]:=3;
a[3]:=5;
a[4]:=7;
a[5]:=11;
a[6]:=101;
a[7]:=131;
a[8]:=151;
a[9]:=181;
a[10]:=191;
a[11]:=313;
a[12]:=353;
a[13]:=373;
a[14]:=383;
a[15]:=727;
a[16]:=757;
a[17]:=787;
a[18]:=797;
a[19]:=919;
a[20]:=929;
a[21]:=10301;
a[22]:=10501;
a[23]:=10601;
a[24]:=11311;
a[25]:=11411;
a[26]:=12421;
a[27]:=12721;
a[28]:=12821;
a[29]:=13331;
a[30]:=13831;
a[31]:=13931;
a[32]:=14341;
a[33]:=14741;
a[34]:=15451;
a[35]:=15551;
a[36]:=16061;
a[37]:=16361;
a[38]:=16561;
a[39]:=16661;
a[40]:=17471;
a[41]:=17971;
a[42]:=18181;
a[43]:=18481;
a[44]:=19391;
a[45]:=19891;
a[46]:=19991;
a[47]:=30103;
a[48]:=30203;
a[49]:=30403;
a[50]:=30703;
a[51]:=30803;
a[52]:=31013;
a[53]:=31513;
a[54]:=32323;
a[55]:=32423;
a[56]:=33533;
a[57]:=34543;
a[58]:=34843;
a[59]:=35053;
a[60]:=35153;
a[61]:=35353;
a[62]:=35753;
a[63]:=36263;
a[64]:=36563;
a[65]:=37273;
a[66]:=37573;
a[67]:=38083;
a[68]:=38183;
a[69]:=38783;
a[70]:=39293;
a[71]:=70207;
a[72]:=70507;
a[73]:=70607;
a[74]:=71317;
a[75]:=71917;
a[76]:=72227;
a[77]:=72727;
a[78]:=73037;
a[79]:=73237;
a[80]:=73637;
a[81]:=74047;
a[82]:=74747;
a[83]:=75557;
a[84]:=76367;
a[85]:=76667;
a[86]:=77377;
a[87]:=77477;
a[88]:=77977;
a[89]:=78487;
a[90]:=78787;
a[91]:=78887;
a[92]:=79397;
a[93]:=79697;
a[94]:=79997;
a[95]:=90709;
a[96]:=91019;
a[97]:=93139;
a[98]:=93239;
a[99]:=93739;
a[100]:=94049;
a[101]:=94349;
a[102]:=94649;
a[103]:=94849;
a[104]:=94949;
a[105]:=95959;
a[106]:=96269;
a[107]:=96469;
a[108]:=96769;
a[109]:=97379;
a[110]:=97579;
a[111]:=97879;
a[112]:=98389;
a[113]:=98689;
a[114]:=1003001;
a[115]:=1008001;
a[116]:=1022201;
a[117]:=1028201;
a[118]:=1035301;
a[119]:=1043401;
a[120]:=1055501;
a[121]:=1062601;
a[122]:=1065601;
a[123]:=1074701;
a[124]:=1082801;
a[125]:=1085801;
a[126]:=1092901;
a[127]:=1093901;
a[128]:=1114111;
a[129]:=1117111;
a[130]:=1120211;
a[131]:=1123211;
a[132]:=1126211;
a[133]:=1129211;
a[134]:=1134311;
a[135]:=1145411;
a[136]:=1150511;
a[137]:=1153511;
a[138]:=1160611;
a[139]:=1163611;
a[140]:=1175711;
a[141]:=1177711;
a[142]:=1178711;
a[143]:=1180811;
a[144]:=1183811;
a[145]:=1186811;
a[146]:=1190911;
a[147]:=1193911;
a[148]:=1196911;
a[149]:=1201021;
a[150]:=1208021;
a[151]:=1212121;
a[152]:=1215121;
a[153]:=1218121;
a[154]:=1221221;
a[155]:=1235321;
a[156]:=1242421;
a[157]:=1243421;
a[158]:=1245421;
a[159]:=1250521;
a[160]:=1253521;
a[161]:=1257521;
a[162]:=1262621;
a[163]:=1268621;
a[164]:=1273721;
a[165]:=1276721;
a[166]:=1278721;
a[167]:=1280821;
a[168]:=1281821;
a[169]:=1286821;
a[170]:=1287821;
a[171]:=1300031;
a[172]:=1303031;
a[173]:=1311131;
a[174]:=1317131;
a[175]:=1327231;
a[176]:=1328231;
a[177]:=1333331;
a[178]:=1335331;
a[179]:=1338331;
a[180]:=1343431;
a[181]:=1360631;
a[182]:=1362631;
a[183]:=1363631;
a[184]:=1371731;
a[185]:=1374731;
a[186]:=1390931;
a[187]:=1407041;
a[188]:=1409041;
a[189]:=1411141;
a[190]:=1412141;
a[191]:=1422241;
a[192]:=1437341;
a[193]:=1444441;
a[194]:=1447441;
a[195]:=1452541;
a[196]:=1456541;
a[197]:=1461641;
a[198]:=1463641;
a[199]:=1464641;
a[200]:=1469641;
a[201]:=1486841;
a[202]:=1489841;
a[203]:=1490941;
a[204]:=1496941;
a[205]:=1508051;
a[206]:=1513151;
a[207]:=1520251;
a[208]:=1532351;
a[209]:=1535351;
a[210]:=1542451;
a[211]:=1548451;
a[212]:=1550551;
a[213]:=1551551;
a[214]:=1556551;
a[215]:=1557551;
a[216]:=1565651;
a[217]:=1572751;
a[218]:=1579751;
a[219]:=1580851;
a[220]:=1583851;
a[221]:=1589851;
a[222]:=1594951;
a[223]:=1597951;
a[224]:=1598951;
a[225]:=1600061;
a[226]:=1609061;
a[227]:=1611161;
a[228]:=1616161;
a[229]:=1628261;
a[230]:=1630361;
a[231]:=1633361;
a[232]:=1640461;
a[233]:=1643461;
a[234]:=1646461;
a[235]:=1654561;
a[236]:=1657561;
a[237]:=1658561;
a[238]:=1660661;
a[239]:=1670761;
a[240]:=1684861;
a[241]:=1685861;
a[242]:=1688861;
a[243]:=1695961;
a[244]:=1703071;
a[245]:=1707071;
a[246]:=1712171;
a[247]:=1714171;
a[248]:=1730371;
a[249]:=1734371;
a[250]:=1737371;
a[251]:=1748471;
a[252]:=1755571;
a[253]:=1761671;
a[254]:=1764671;
a[255]:=1777771;
a[256]:=1793971;
a[257]:=1802081;
a[258]:=1805081;
a[259]:=1820281;
a[260]:=1823281;
a[261]:=1824281;
a[262]:=1826281;
a[263]:=1829281;
a[264]:=1831381;
a[265]:=1832381;
a[266]:=1842481;
a[267]:=1851581;
a[268]:=1853581;
a[269]:=1856581;
a[270]:=1865681;
a[271]:=1876781;
a[272]:=1878781;
a[273]:=1879781;
a[274]:=1880881;
a[275]:=1881881;
a[276]:=1883881;
a[277]:=1884881;
a[278]:=1895981;
a[279]:=1903091;
a[280]:=1908091;
a[281]:=1909091;
a[282]:=1917191;
a[283]:=1924291;
a[284]:=1930391;
a[285]:=1936391;
a[286]:=1941491;
a[287]:=1951591;
a[288]:=1952591;
a[289]:=1957591;
a[290]:=1958591;
a[291]:=1963691;
a[292]:=1968691;
a[293]:=1969691;
a[294]:=1970791;
a[295]:=1976791;
a[296]:=1981891;
a[297]:=1982891;
a[298]:=1984891;
a[299]:=1987891;
a[300]:=1988891;
a[301]:=1993991;
a[302]:=1995991;
a[303]:=1998991;
a[304]:=3001003;
a[305]:=3002003;
a[306]:=3007003;
a[307]:=3016103;
a[308]:=3026203;
a[309]:=3064603;
a[310]:=3065603;
a[311]:=3072703;
a[312]:=3073703;
a[313]:=3075703;
a[314]:=3083803;
a[315]:=3089803;
a[316]:=3091903;
a[317]:=3095903;
a[318]:=3103013;
a[319]:=3106013;
a[320]:=3127213;
a[321]:=3135313;
a[322]:=3140413;
a[323]:=3155513;
a[324]:=3158513;
a[325]:=3160613;
a[326]:=3166613;
a[327]:=3181813;
a[328]:=3187813;
a[329]:=3193913;
a[330]:=3196913;
a[331]:=3198913;
a[332]:=3211123;
a[333]:=3212123;
a[334]:=3218123;
a[335]:=3222223;
a[336]:=3223223;
a[337]:=3228223;
a[338]:=3233323;
a[339]:=3236323;
a[340]:=3241423;
a[341]:=3245423;
a[342]:=3252523;
a[343]:=3256523;
a[344]:=3258523;
a[345]:=3260623;
a[346]:=3267623;
a[347]:=3272723;
a[348]:=3283823;
a[349]:=3285823;
a[350]:=3286823;
a[351]:=3288823;
a[352]:=3291923;
a[353]:=3293923;
a[354]:=3304033;
a[355]:=3305033;
a[356]:=3307033;
a[357]:=3310133;
a[358]:=3315133;
a[359]:=3319133;
a[360]:=3321233;
a[361]:=3329233;
a[362]:=3331333;
a[363]:=3337333;
a[364]:=3343433;
a[365]:=3353533;
a[366]:=3362633;
a[367]:=3364633;
a[368]:=3365633;
a[369]:=3368633;
a[370]:=3380833;
a[371]:=3391933;
a[372]:=3392933;
a[373]:=3400043;
a[374]:=3411143;
a[375]:=3417143;
a[376]:=3424243;
a[377]:=3425243;
a[378]:=3427243;
a[379]:=3439343;
a[380]:=3441443;
a[381]:=3443443;
a[382]:=3444443;
a[383]:=3447443;
a[384]:=3449443;
a[385]:=3452543;
a[386]:=3460643;
a[387]:=3466643;
a[388]:=3470743;
a[389]:=3479743;
a[390]:=3485843;
a[391]:=3487843;
a[392]:=3503053;
a[393]:=3515153;
a[394]:=3517153;
a[395]:=3528253;
a[396]:=3541453;
a[397]:=3553553;
a[398]:=3558553;
a[399]:=3563653;
a[400]:=3569653;
a[401]:=3586853;
a[402]:=3589853;
a[403]:=3590953;
a[404]:=3591953;
a[405]:=3594953;
a[406]:=3601063;
a[407]:=3607063;
a[408]:=3618163;
a[409]:=3621263;
a[410]:=3627263;
a[411]:=3635363;
a[412]:=3643463;
a[413]:=3646463;
a[414]:=3670763;
a[415]:=3673763;
a[416]:=3680863;
a[417]:=3689863;
a[418]:=3698963;
a[419]:=3708073;
a[420]:=3709073;
a[421]:=3716173;
a[422]:=3717173;
a[423]:=3721273;
a[424]:=3722273;
a[425]:=3728273;
a[426]:=3732373;
a[427]:=3743473;
a[428]:=3746473;
a[429]:=3762673;
a[430]:=3763673;
a[431]:=3765673;
a[432]:=3768673;
a[433]:=3769673;
a[434]:=3773773;
a[435]:=3774773;
a[436]:=3781873;
a[437]:=3784873;
a[438]:=3792973;
a[439]:=3793973;
a[440]:=3799973;
a[441]:=3804083;
a[442]:=3806083;
a[443]:=3812183;
a[444]:=3814183;
a[445]:=3826283;
a[446]:=3829283;
a[447]:=3836383;
a[448]:=3842483;
a[449]:=3853583;
a[450]:=3858583;
a[451]:=3863683;
a[452]:=3864683;
a[453]:=3867683;
a[454]:=3869683;
a[455]:=3871783;
a[456]:=3878783;
a[457]:=3893983;
a[458]:=3899983;
a[459]:=3913193;
a[460]:=3916193;
a[461]:=3918193;
a[462]:=3924293;
a[463]:=3927293;
a[464]:=3931393;
a[465]:=3938393;
a[466]:=3942493;
a[467]:=3946493;
a[468]:=3948493;
a[469]:=3964693;
a[470]:=3970793;
a[471]:=3983893;
a[472]:=3991993;
a[473]:=3994993;
a[474]:=3997993;
a[475]:=3998993;
a[476]:=7014107;
a[477]:=7035307;
a[478]:=7036307;
a[479]:=7041407;
a[480]:=7046407;
a[481]:=7057507;
a[482]:=7065607;
a[483]:=7069607;
a[484]:=7073707;
a[485]:=7079707;
a[486]:=7082807;
a[487]:=7084807;
a[488]:=7087807;
a[489]:=7093907;
a[490]:=7096907;
a[491]:=7100017;
a[492]:=7114117;
a[493]:=7115117;
a[494]:=7118117;
a[495]:=7129217;
a[496]:=7134317;
a[497]:=7136317;
a[498]:=7141417;
a[499]:=7145417;
a[500]:=7155517;
a[501]:=7156517;
a[502]:=7158517;
a[503]:=7159517;
a[504]:=7177717;
a[505]:=7190917;
a[506]:=7194917;
a[507]:=7215127;
a[508]:=7226227;
a[509]:=7246427;
a[510]:=7249427;
a[511]:=7250527;
a[512]:=7256527;
a[513]:=7257527;
a[514]:=7261627;
a[515]:=7267627;
a[516]:=7276727;
a[517]:=7278727;
a[518]:=7291927;
a[519]:=7300037;
a[520]:=7302037;
a[521]:=7310137;
a[522]:=7314137;
a[523]:=7324237;
a[524]:=7327237;
a[525]:=7347437;
a[526]:=7352537;
a[527]:=7354537;
a[528]:=7362637;
a[529]:=7365637;
a[530]:=7381837;
a[531]:=7388837;
a[532]:=7392937;
a[533]:=7401047;
a[534]:=7403047;
a[535]:=7409047;
a[536]:=7415147;
a[537]:=7434347;
a[538]:=7436347;
a[539]:=7439347;
a[540]:=7452547;
a[541]:=7461647;
a[542]:=7466647;
a[543]:=7472747;
a[544]:=7475747;
a[545]:=7485847;
a[546]:=7486847;
a[547]:=7489847;
a[548]:=7493947;
a[549]:=7507057;
a[550]:=7508057;
a[551]:=7518157;
a[552]:=7519157;
a[553]:=7521257;
a[554]:=7527257;
a[555]:=7540457;
a[556]:=7562657;
a[557]:=7564657;
a[558]:=7576757;
a[559]:=7586857;
a[560]:=7592957;
a[561]:=7594957;
a[562]:=7600067;
a[563]:=7611167;
a[564]:=7619167;
a[565]:=7622267;
a[566]:=7630367;
a[567]:=7632367;
a[568]:=7644467;
a[569]:=7654567;
a[570]:=7662667;
a[571]:=7665667;
a[572]:=7666667;
a[573]:=7668667;
a[574]:=7669667;
a[575]:=7674767;
a[576]:=7681867;
a[577]:=7690967;
a[578]:=7693967;
a[579]:=7696967;
a[580]:=7715177;
a[581]:=7718177;
a[582]:=7722277;
a[583]:=7729277;
a[584]:=7733377;
a[585]:=7742477;
a[586]:=7747477;
a[587]:=7750577;
a[588]:=7758577;
a[589]:=7764677;
a[590]:=7772777;
a[591]:=7774777;
a[592]:=7778777;
a[593]:=7782877;
a[594]:=7783877;
a[595]:=7791977;
a[596]:=7794977;
a[597]:=7807087;
a[598]:=7819187;
a[599]:=7820287;
a[600]:=7821287;
a[601]:=7831387;
a[602]:=7832387;
a[603]:=7838387;
a[604]:=7843487;
a[605]:=7850587;
a[606]:=7856587;
a[607]:=7865687;
a[608]:=7867687;
a[609]:=7868687;
a[610]:=7873787;
a[611]:=7884887;
a[612]:=7891987;
a[613]:=7897987;
a[614]:=7913197;
a[615]:=7916197;
a[616]:=7930397;
a[617]:=7933397;
a[618]:=7935397;
a[619]:=7938397;
a[620]:=7941497;
a[621]:=7943497;
a[622]:=7949497;
a[623]:=7957597;
a[624]:=7958597;
a[625]:=7960697;
a[626]:=7977797;
a[627]:=7984897;
a[628]:=7985897;
a[629]:=7987897;
a[630]:=7996997;
a[631]:=9002009;
a[632]:=9015109;
a[633]:=9024209;
a[634]:=9037309;
a[635]:=9042409;
a[636]:=9043409;
a[637]:=9045409;
a[638]:=9046409;
a[639]:=9049409;
a[640]:=9067609;
a[641]:=9073709;
a[642]:=9076709;
a[643]:=9078709;
a[644]:=9091909;
a[645]:=9095909;
a[646]:=9103019;
a[647]:=9109019;
a[648]:=9110119;
a[649]:=9127219;
a[650]:=9128219;
a[651]:=9136319;
a[652]:=9149419;
a[653]:=9169619;
a[654]:=9173719;
a[655]:=9174719;
a[656]:=9179719;
a[657]:=9185819;
a[658]:=9196919;
a[659]:=9199919;
a[660]:=9200029;
a[661]:=9209029;
a[662]:=9212129;
a[663]:=9217129;
a[664]:=9222229;
a[665]:=9223229;
a[666]:=9230329;
a[667]:=9231329;
a[668]:=9255529;
a[669]:=9269629;
a[670]:=9271729;
a[671]:=9277729;
a[672]:=9280829;
a[673]:=9286829;
a[674]:=9289829;
a[675]:=9318139;
a[676]:=9320239;
a[677]:=9324239;
a[678]:=9329239;
a[679]:=9332339;
a[680]:=9338339;
a[681]:=9351539;
a[682]:=9357539;
a[683]:=9375739;
a[684]:=9384839;
a[685]:=9397939;
a[686]:=9400049;
a[687]:=9414149;
a[688]:=9419149;
a[689]:=9433349;
a[690]:=9439349;
a[691]:=9440449;
a[692]:=9446449;
a[693]:=9451549;
a[694]:=9470749;
a[695]:=9477749;
a[696]:=9492949;
a[697]:=9493949;
a[698]:=9495949;
a[699]:=9504059;
a[700]:=9514159;
a[701]:=9526259;
a[702]:=9529259;
a[703]:=9547459;
a[704]:=9556559;
a[705]:=9558559;
a[706]:=9561659;
a[707]:=9577759;
a[708]:=9583859;
a[709]:=9585859;
a[710]:=9586859;
a[711]:=9601069;
a[712]:=9602069;
a[713]:=9604069;
a[714]:=9610169;
a[715]:=9620269;
a[716]:=9624269;
a[717]:=9626269;
a[718]:=9632369;
a[719]:=9634369;
a[720]:=9645469;
a[721]:=9650569;
a[722]:=9657569;
a[723]:=9670769;
a[724]:=9686869;
a[725]:=9700079;
a[726]:=9709079;
a[727]:=9711179;
a[728]:=9714179;
a[729]:=9724279;
a[730]:=9727279;
a[731]:=9732379;
a[732]:=9733379;
a[733]:=9743479;
a[734]:=9749479;
a[735]:=9752579;
a[736]:=9754579;
a[737]:=9758579;
a[738]:=9762679;
a[739]:=9770779;
a[740]:=9776779;
a[741]:=9779779;
a[742]:=9781879;
a[743]:=9782879;
a[744]:=9787879;
a[745]:=9788879;
a[746]:=9795979;
a[747]:=9801089;
a[748]:=9807089;
a[749]:=9809089;
a[750]:=9817189;
a[751]:=9818189;
a[752]:=9820289;
a[753]:=9822289;
a[754]:=9836389;
a[755]:=9837389;
a[756]:=9845489;
a[757]:=9852589;
a[758]:=9871789;
a[759]:=9888889;
a[760]:=9889889;
a[761]:=9896989;
a[762]:=9902099;
a[763]:=9907099;
a[764]:=9908099;
a[765]:=9916199;
a[766]:=9918199;
a[767]:=9919199;
a[768]:=9921299;
a[769]:=9923299;
a[770]:=9926299;
a[771]:=9927299;
a[772]:=9931399;
a[773]:=9932399;
a[774]:=9935399;
a[775]:=9938399;
a[776]:=9957599;
a[777]:=9965699;
a[778]:=9978799;
a[779]:=9980899;
a[780]:=9981899;
a[781]:=9989899;
readln(m,n);
for i:=1 to 781 do
if (a[i]>=m) and(a[i] -
02009-01-01 16:27:15@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 712ms
├ 测试数据 08:答案正确... 556ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 650ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:1918ms这题不cheat就是看优化,硬碰硬的题……