Сверхпростые числа (Pascal)
Напишите программу вычисления сверхпростых чисел. Простым называется такое число, которое делится без остатка только на единицу и само себя (например, 5, 11, 19), сверхпростым – такое простое число, которое остается таким и в случае перестановки его цифр (например, 19-91).
Вот программа (делаются не все проверки корректности; например, верхняя граница допустимого ввода на самом деле не равна MAXLONGINT
; алгоритм проверки числа на простоту также самый простой и избыточный).
program SuperSimple; uses crt; function Simple (var n:longint):longint; var i:longint; begin for i:=2 to n div 2 do if n mod i = 0 then begin Simple:=i; Exit; end; Simple:=0; end; procedure Swap (var s1,s2:char); var c:char; begin c:=s1; s1:=s2; s2:=c; end; function Invert (n:longint):longint; var i,l,l2,e:integer; v:longint; s:string; begin str (n,s); l:=length(s); l2:=l div 2; for i:=1 to l2 do Swap (s[i],s[l-i+1]); val(s,v,e); if e<>0 then Invert:=0 else Invert:=v; end; function ReadLongInt (s:string; a,b:longint):longint; var n:longint; begin writeln; write (s,' '); repeat {$I-}read(n);{$I+} if (IoResult<>0) or (n<a) or (n>b) then writeln ('Неверный ввод. Требуется целое от ',a,' до ',b) else break; until false; ReadLongInt:=n; end; var nn,n,no:longint; begin clrscr; nn:=ReadLongInt ('Верхняя граница сверхпростых чисел?',1,MAXLONGINT); for n:=1 to nn do if Simple(n)=0 then begin no:=Invert (n); if Simple(no)=0 then write ('(',n,',',no,') '); end; writeln; writeln ('OK. Enter для выхода'); Reset(Input); Readln; end.
В "Турбо-Паскале" отсюда должно работать.
Вот листинг вывода программы - все пары сверхпростых чисел от 1 до 100000.
(1,1) (2,2) (3,3) (5,5) (7,7) (11,11) (13,31) (17,71) (31,13) (37,73) (71,17) (73,37) (79,97) (97,79) (101,101) (107,701) (113,311) (131,131) (149,941) (151,151) (157,751) (167,761) (179,971) (181,181) (191,191) (199,991) (311,113) (313,313) (337,733) (347,743) (353,353) (359,953) (373,373) (383,383) (389,983) (701,107) (709,907) (727,727) (733,337) (739,937) (743,347) (751,157) (757,757) (761,167) (769,967) (787,787) (797,797) (907,709) (919,919) (929,929) (937,739) (941,149) (953,359) (967,769) (971,179) (983,389) (991,199) (1009,9001) (1021,1201) (1031,1301) (1033,3301) (1061,1601) (1069,9601) (1091,1901) (1097,7901) (1103,3011) (1109,9011) (1151,1511) (1153,3511) (1181,1811) (1193,3911) (1201,1021) (1213,3121) (1217,7121) (1223,3221) (1229,9221) (1231,1321) (1237,7321) (1249,9421) (1259,9521) (1279,9721) (1283,3821) (1301,1031) (1321,1231) (1381,1831) (1399,9931) (1409,9041) (1429,9241) (1439,9341) (1453,3541) (1471,1741) (1487,7841) (1499,9941) (1511,1151) (1523,3251) (1559,9551) (1583,3851) (1597,7951) (1601,1061) (1619,9161) (1657,7561) (1669,9661) (1723,3271) (1733,3371) (1741,1471) (1753,3571) (1789,9871) (1811,1181) (1831,1381) (1847,7481) (1867,7681) (1879,9781) (1901,1091) (1913,3191) (1933,3391) (1949,9491) (1979,9791) (3011,1103) (3019,9103) (3023,3203) (3049,9403) (3067,7603) (3083,3803) (3089,9803) (3109,9013) (3121,1213) (3163,3613) (3169,9613) (3191,1913) (3203,3023) (3221,1223) (3251,1523) (3257,7523) (3271,1723) (3299,9923) (3301,1033) (3319,9133) (3343,3433) (3347,7433) (3359,9533) (3371,1733) (3373,3733) (3389,9833) (3391,1933) (3407,7043) (3433,3343) (3463,3643) (3467,7643) (3469,9643) (3511,1153) (3527,7253) (3541,1453) (3571,1753) (3583,3853) (3613,3163) (3643,3463) (3697,7963) (3719,9173) (3733,3373) (3767,7673) (3803,3083) (3821,1283) (3851,1583) (3853,3583) (3889,9883) (3911,1193) (3917,7193) (3929,9293) (7027,7207) (7043,3407) (7057,7507) (7121,1217) (7177,7717) (7187,7817) (7193,3917) (7207,7027) (7219,9127) (7229,9227) (7253,3527) (7297,7927) (7321,1237) (7349,9437) (7433,3347) (7457,7547) (7459,9547) (7481,1847) (7507,7057) (7523,3257) (7529,9257) (7547,7457) (7561,1657) (7577,7757) (7589,9857) (7603,3067) (7643,3467) (7649,9467) (7673,3767) (7681,1867) (7687,7867) (7699,9967) (7717,7177) (7757,7577) (7817,7187) (7841,1487) (7867,7687) (7879,9787) (7901,1097) (7927,7297) (7949,9497) (7951,1597) (7963,3697) (9001,1009) (9011,1109) (9013,3109) (9029,9209) (9041,1409) (9103,3019) (9127,7219) (9133,3319) (9161,1619) (9173,3719) (9209,9029) (9221,1229) (9227,7229) (9241,1429) (9257,7529) (9293,3929) (9341,1439) (9349,9439) (9403,3049) (9421,1249) (9437,7349) (9439,9349) (9467,7649) (9479,9749) (9491,1949) (9497,7949) (9521,1259) (9533,3359) (9547,7459) (9551,1559) (9601,1069) (9613,3169) (9643,3469) (9661,1669) (9679,9769) (9721,1279) (9749,9479) (9769,9679) (9781,1879) (9787,7879) (9791,1979) (9803,3089) (9833,3389) (9857,7589) (9871,1789) (9883,3889) (9923,3299) (9931,1399) (9941,1499) (9967,7699) (10007,70001) (10009,90001) (10039,93001) (10061,16001) (10067,76001) (10069,96001) (10079,97001) (10091,19001) (10151,15101) (10159,95101) (10177,77101) (10247,74201) (10253,35201) (10273,37201) (10301,10301) (10321,12301) (10333,33301) (10343,34301) (10391,19301) (10429,92401) (10453,35401) (10457,75401) (10459,95401) (10487,78401) (10499,99401) (10501,10501) (10601,10601) (10613,31601) (10639,93601) (10651,15601) (10711,11701) (10739,93701) (10781,18701) (10853,35801) (10859,95801) (10867,76801) (10889,98801) (10891,19801) (10909,90901) (10939,93901) (10987,78901) (10993,39901) (11003,30011) (11057,75011) (11071,17011) (11083,38011) (11149,94111) (11159,95111) (11161,16111) (11197,79111) (11243,34211) (11257,75211) (11311,11311) (11329,92311) (11353,35311) (11411,11411) (11423,32411) (11447,74411) (11489,98411) (11497,79411) (11551,15511) (11579,97511) (11587,78511) (11593,39511) (11621,12611) (11657,75611) (11677,77611) (11699,99611) (11701,10711) (11717,71711) (11719,91711) (11731,13711) (11777,77711) (11779,97711) (11783,38711) (11789,98711) (11833,33811) (11839,93811) (11897,79811) (11903,30911) (11909,90911) (11923,32911) (11927,72911) (11933,33911) (11939,93911) (11953,35911) (11959,95911) (11969,96911) (11971,17911) (11981,18911) (12071,17021) (12073,37021) (12107,70121) (12109,90121) (12113,31121) (12119,91121) (12149,94121) (12227,72221) (12241,14221) (12253,35221) (12269,96221) (12289,98221) (12301,10321) (12323,32321) (12373,37321) (12421,12421) (12437,73421) (12491,19421) (12547,74521) (12553,35521) (12577,77521) (12611,11621) (12619,91621) (12641,14621) (12659,95621) (12689,98621) (12697,79621) (12713,31721) (12721,12721) (12743,34721) (12757,75721) (12763,36721) (12799,99721) (12809,90821) (12821,12821) (12829,92821) (12841,14821) (12893,39821) (12907,70921) (12919,91921) (12983,38921) (13009,90031) (13043,34031) (13147,74131) (13151,15131) (13159,95131) (13163,36131) (13259,95231) (13267,76231) (13291,19231) (13297,79231) (13331,13331) (13337,73331) (13441,14431) (13457,75431) (13469,96431) (13477,77431) (13499,99431) (13513,31531) (13523,32531) (13553,35531) (13591,19531) (13597,79531) (13619,91631) (13693,39631) (13697,79631) (13709,90731) (13711,11731) (13751,15731) (13757,75731) (13759,95731) (13781,18731) (13789,98731) (13829,92831) (13831,13831) (13841,14831) (13873,37831) (13903,30931) (13931,13931) (13933,33931) (13963,36931) (14029,92041) (14057,75041) (14071,17041) (14081,18041) (14087,78041) (14107,70141) (14143,34141) (14153,35141) (14177,77141) (14207,70241) (14221,12241) (14251,15241) (14293,39241) (14303,30341) (14323,32341) (14327,72341) (14341,14341) (14387,78341) (14423,32441) (14431,13441) (14447,74441) (14449,94441) (14479,97441) (14519,91541) (14549,94541) (14551,15541) (14557,75541) (14563,36541) (14591,19541) (14593,39541) (14621,12641) (14629,92641) (14633,33641) (14657,75641) (14713,31741) (14717,71741) (14741,14741) (14821,12841) (14831,13841) (14843,34841) (14879,97841) (14891,19841) (14897,79841) (14923,32941) (14929,92941) (14939,93941) (14947,74941) (14957,75941) (15013,31051) (15053,35051) (15091,19051) (15101,10151) (15131,13151) (15139,93151) (15149,94151) (15227,72251) (15241,14251) (15263,36251) (15289,98251) (15299,99251) (15307,70351) (15349,94351) (15377,77351) (15383,38351) (15451,15451) (15461,16451) (15493,39451) (15497,79451) (15511,11551) (15527,72551) (15541,14551) (15551,15551) (15601,10651) (15643,34651) (15649,94651) (15661,16651) (15667,76651) (15679,97651) (15683,38651) (15731,13751) (15733,33751) (15737,73751) (15791,19751) (15803,30851) (15907,70951) (15919,91951) (15937,73951) (15973,37951) (16001,10061) (16007,70061) (16061,16061) (16063,36061) (16073,37061) (16103,30161) (16111,11161) (16127,72161) (16193,39161) (16217,71261) (16223,32261) (16249,94261) (16267,76261) (16361,16361) (16427,72461) (16433,33461) (16451,15461) (16453,35461) (16481,18461) (16493,39461) (16547,74561) (16561,16561) (16567,76561) (16573,37561) (16603,30661) (16651,15661) (16661,16661) (16691,19661) (16699,99661) (16729,92761) (16747,74761) (16763,36761) (16829,92861) (16879,97861) (16883,38861) (16937,73961) (16943,34961) (16979,97961) (17011,11071) (17021,12071) (17033,33071) (17041,14071) (17047,74071) (17117,71171) (17203,30271) (17207,70271) (17209,90271) (17383,38371) (17393,39371) (17417,71471) (17443,34471) (17467,76471) (17471,17471) (17477,77471) (17491,19471) (17519,91571) (17573,37571) (17579,97571) (17599,99571) (17627,72671) (17669,96671) (17681,18671) (17683,38671) (17713,31771) (17737,73771) (17747,74771) (17749,94771) (17827,72871) (17839,93871) (17863,36871) (17903,30971) (17909,90971) (17911,11971) (17923,32971) (17939,93971) (17959,95971) (17971,17971) (18013,31081) (18041,14081) (18077,77081) (18089,98081) (18133,33181) (18169,96181) (18181,18181) (18191,19181) (18199,99181) (18253,35281) (18269,96281) (18307,70381) (18329,92381) (18353,35381) (18379,97381) (18413,31481) (18427,72481) (18439,93481) (18461,16481) (18481,18481) (18539,93581) (18593,39581) (18637,73681) (18671,17681) (18691,19681) (18701,10781) (18719,91781) (18731,13781) (18743,34781) (18749,94781) (18757,75781) (18773,37781) (18787,78781) (18803,30881) (18859,95881) (18899,99881) (18911,11981) (18913,31981) (19001,10091) (19013,31091) (19037,73091) (19051,15091) (19163,36191) (19181,18191) (19219,91291) (19231,13291) (19237,73291) (19249,94291) (19301,10391) (19333,33391) (19391,19391) (19403,30491) (19421,12491) (19423,32491) (19471,17491) (19477,77491) (19489,98491) (19531,13591) (19541,14591) (19543,34591) (19553,35591) (19577,77591) (19661,16691) (19681,18691) (19687,78691) (19697,79691) (19751,15791) (19759,95791) (19763,36791) (19793,39791) (19801,10891) (19813,31891) (19841,14891) (19891,19891) (19913,31991) (19973,37991) (19991,19991) (30011,11003) (30029,92003) (30059,95003) (30103,30103) (30139,93103) (30161,16103) (30197,79103) (30203,30203) (30223,32203) (30259,95203) (30271,17203) (30319,91303) (30323,32303) (30341,14303) (30367,76303) (30403,30403) (30467,76403) (30491,19403) (30517,71503) (30529,92503) (30539,93503) (30557,75503) (30593,39503) (30643,34603) (30649,94603) (30661,16603) (30703,30703) (30757,75703) (30803,30803) (30809,90803) (30851,15803) (30853,35803) (30859,95803) (30881,18803) (30911,11903) (30931,13903) (30949,94903) (30971,17903) (30983,38903) (31013,31013) (31033,33013) (31051,15013) (31063,36013) (31069,96013) (31081,18013) (31091,19013) (31121,12113) (31139,93113) (31183,38113) (31193,39113) (31223,32213) (31259,95213) (31267,76213) (31277,77213) (31307,70313) (31327,72313) (31393,39313) (31481,18413) (31513,31513) (31531,13513) (31543,34513) (31601,10613) (31627,72613) (31643,34613) (31649,94613) (31721,12713) (31723,32713) (31741,14713) (31771,17713) (31799,99713) (31859,95813) (31873,37813) (31891,19813) (31907,70913) (31957,75913) (31963,36913) (31981,18913) (31991,19913) (32009,90023) (32077,77023) (32099,99023) (32143,34123) (32173,37123) (32189,98123) (32203,30223) (32213,31223) (32233,33223) (32257,75223) (32261,16223) (32299,99223) (32303,30323) (32321,12323) (32323,32323) (32341,14323) (32353,35323) (32369,96323) (32377,77323) (32411,11423) (32423,32423) (32441,14423) (32467,76423) (32479,97423) (32491,19423) (32497,79423) (32531,13523) (32537,73523) (32563,36523) (32579,97523) (32633,33623) (32647,74623) (32687,78623) (32693,39623) (32713,31723) (32749,94723) (32783,38723) (32869,96823) (32887,78823) (32911,11923) (32933,33923) (32939,93923) (32941,14923) (32971,17923) (32983,38923) (32999,99923) (33013,31033) (33029,92033) (33049,94033) (33071,17033) (33181,18133) (33199,99133) (33223,32233) (33287,78233) (33301,10333) (33317,71333) (33329,92333) (33391,19333) (33461,16433) (33533,33533) (33589,98533) (33617,71633) (33623,32633) (33641,14633) (33751,15733) (33767,76733) (33809,90833) (33811,11833) (33857,75833) (33863,36833) (33911,11933) (33923,32933) (33931,13933) (34031,13043) (34123,32143) (34129,92143) (34141,14143) (34147,74143) (34159,95143) (34211,11243) (34267,76243) (34273,37243) (34301,10343) (34367,76343) (34469,96443) (34471,17443) (34513,31543) (34543,34543) (34549,94543) (34583,38543) (34589,98543) (34591,19543) (34603,30643) (34613,31643) (34651,15643) (34673,37643) (34687,78643) (34721,12743) (34757,75743) (34781,18743) (34807,70843) (34841,14843) (34843,34843) (34847,74843) (34897,79843) (34919,91943) (34961,16943) (34963,36943) (35027,72053) (35051,15053) (35053,35053) (35069,96053) (35083,38053) (35099,99053) (35117,71153) (35129,92153) (35141,14153) (35149,94153) (35153,35153) (35159,95153) (35201,10253) (35221,12253) (35227,72253) (35257,75253) (35267,76253) (35281,18253) (35311,11353) (35317,71353) (35323,32353) (35327,72353) (35353,35353) (35363,36353) (35381,18353) (35401,10453) (35419,91453) (35437,73453) (35447,74453) (35461,16453) (35521,12553) (35531,13553) (35537,73553) (35569,96553) (35591,19553) (35729,92753) (35753,35753) (35801,10853) (35803,30853) (35911,11953) (35969,96953) (35983,38953) (35993,39953) (36013,31063) (36037,73063) (36061,16063) (36097,79063) (36107,70163) (36109,90163) (36131,13163) (36187,78163) (36191,19163) (36209,90263) (36217,71263) (36251,15263) (36263,36263) (36269,96263) (36277,77263) (36353,35363) (36373,37363) (36467,76463) (36473,37463) (36479,97463) (36523,32563) (36541,14563) (36563,36563) (36599,99563) (36607,70663) (36721,12763) (36739,93763) (36761,16763) (36791,19763) (36809,90863) (36833,33863) (36871,17863) (36877,77863) (36913,31963) (36931,13963) (36943,34963) (36973,37963) (37021,12073) (37061,16073) (37123,32173) (37199,99173) (37201,10273) (37243,34273) (37273,37273) (37307,70373) (37309,90373) (37321,12373) (37363,36373) (37379,97373) (37409,90473) (37463,36473) (37489,98473) (37507,70573) (37547,74573) (37549,94573) (37561,16573) (37571,17573) (37573,37573) (37589,98573) (37619,91673) (37643,34673) (37781,18773) (37813,31873) (37831,13873) (37847,74873) (37889,98873) (37897,79873) (37951,15973) (37963,36973) (37991,19973) (37997,79973) (38011,11083) (38039,93083) (38053,35083) (38083,38083) (38113,31183) (38119,91183) (38183,38183) (38219,91283) (38239,93283) (38287,78283) (38327,72383) (38329,92383) (38351,15383) (38371,17383) (38377,77383) (38393,39383) (38449,94483) (38459,95483) (38543,34583) (38557,75583) (38629,92683) (38639,93683) (38651,15683) (38671,17683) (38707,70783) (38711,11783) (38723,32783) (38737,73783) (38783,38783) (38861,16883) (38867,76883) (38903,30983) (38917,71983) (38921,12983) (38923,32983) (38953,35983) (38977,77983) (38993,39983) (39047,74093) (39113,31193) (39119,91193) (39157,75193) (39161,16193) (39217,71293) (39241,14293) (39293,39293) (39313,31393) (39359,95393) (39371,17393) (39383,38393) (39397,79393) (39419,91493) (39439,93493) (39451,15493) (39461,16493) (39503,30593) (39511,11593) (39541,14593) (39581,18593) (39623,32693) (39631,13693) (39709,90793) (39749,94793) (39791,19793) (39799,99793) (39821,12893) (39827,72893) (39829,92893) (39839,93893) (39869,96893) (39877,77893) (39887,78893) (39901,10993) (39929,92993) (39953,35993) (39983,38993) (39989,98993) (70001,10007) (70009,90007) (70061,16007) (70079,97007) (70121,12107) (70141,14107) (70163,36107) (70207,70207) (70241,14207) (70249,94207) (70271,17207) (70289,98207) (70313,31307) (70327,72307) (70351,15307) (70373,37307) (70381,18307) (70439,93407) (70457,75407) (70489,98407) (70507,70507) (70529,92507) (70573,37507) (70589,98507) (70607,70607) (70639,93607) (70663,36607) (70667,76607) (70687,78607) (70717,71707) (70729,92707) (70783,38707) (70843,34807) (70913,31907) (70921,12907) (70937,73907) (70949,94907) (70951,15907) (70969,96907) (70997,79907) (70999,99907) (71069,96017) (71089,98017) (71153,35117) (71171,17117) (71209,90217) (71257,75217) (71261,16217) (71263,36217) (71293,39217) (71317,71317) (71329,92317) (71333,33317) (71347,74317) (71353,35317) (71359,95317) (71387,78317) (71389,98317) (71399,99317) (71437,73417) (71471,17417) (71503,30517) (71537,73517) (71569,96517) (71633,33617) (71707,70717) (71711,11717) (71741,14717) (71789,98717) (71899,99817) (71909,90917) (71917,71917) (71983,38917) (72047,74027) (72053,35027) (72109,90127) (72161,16127) (72221,12227) (72227,72227) (72229,92227) (72251,15227) (72253,35227) (72307,70327) (72313,31327) (72337,73327) (72341,14327) (72353,35327) (72379,97327) (72383,38327) (72461,16427) (72481,18427) (72497,79427) (72547,74527) (72551,15527) (72559,95527) (72577,77527) (72613,31627) (72671,17627) (72689,98627) (72727,72727) (72869,96827) (72871,17827) (72893,39827) (72911,11927) (73037,73037) (73063,36037) (73091,19037) (73237,73237) (73277,77237) (73291,19237) (73327,72337) (73331,13337) (73369,96337) (73417,71437) (73421,12437) (73453,35437) (73517,71537) (73523,32537) (73553,35537) (73597,79537) (73637,73637) (73681,18637) (73751,15737) (73771,17737) (73783,38737) (73819,91837) (73849,94837) (73867,76837) (73907,70937) (73939,93937) (73951,15937) (73961,16937) (74027,72047) (74047,74047) (74071,17047) (74077,77047) (74093,39047) (74131,13147) (74143,34147) (74167,76147) (74197,79147) (74201,10247) (74209,90247) (74317,71347) (74357,75347) (74377,77347) (74411,11447) (74441,14447) (74449,94447) (74453,35447) (74509,90547) (74521,12547) (74527,72547) (74561,16547) (74573,37547) (74609,90647) (74623,32647) (74747,74747) (74759,95747) (74761,16747) (74771,17747) (74843,34847) (74869,96847) (74873,37847) (74897,79847) (74941,14947) (74959,95947) (75011,11057) (75041,14057) (75167,76157) (75169,96157) (75193,39157) (75211,11257) (75217,71257) (75223,32257) (75239,93257) (75253,35257) (75289,98257) (75329,92357) (75347,74357) (75401,10457) (75407,70457) (75431,13457) (75503,30557) (75539,93557) (75541,14557) (75557,75557) (75577,77557) (75583,38557) (75611,11657) (75629,92657) (75641,14657) (75703,30757) (75721,12757) (75731,13757) (75743,34757) (75767,76757) (75781,18757) (75797,79757) (75833,33857) (75869,96857) (75913,31957) (75941,14957) (76001,10067) (76147,74167) (76157,75167) (76213,31267) (76231,13267) (76243,34267) (76253,35267) (76259,95267) (76261,16267) (76303,30367) (76343,34367) (76367,76367) (76379,97367) (76387,78367) (76403,30467) (76423,32467) (76463,36467) (76471,17467) (76487,78467) (76561,16567) (76607,70667) (76651,15667) (76667,76667) (76733,33767) (76757,75767) (76801,10867) (76819,91867) (76829,92867) (76837,73867) (76883,38867) (76919,91967) (77023,32077) (77029,92077) (77047,74077) (77081,18077) (77101,10177) (77141,14177) (77213,31277) (77237,73277) (77263,36277) (77323,32377) (77339,93377) (77347,74377) (77351,15377) (77369,96377) (77377,77377) (77383,38377) (77431,13477) (77471,17477) (77477,77477) (77491,19477) (77521,12577) (77527,72577) (77557,75577) (77587,78577) (77591,19577) (77611,11677) (77711,11777) (77797,79777) (77863,36877) (77893,39877) (77899,99877) (77977,77977) (77983,38977) (78041,14087) (78059,95087) (78139,93187) (78163,36187) (78179,97187) (78233,33287) (78259,95287) (78283,38287) (78317,71387) (78341,14387) (78367,76387) (78401,10487) (78439,93487) (78467,76487) (78487,78487) (78511,11587) (78569,96587) (78577,77587) (78607,70687) (78623,32687) (78643,34687) (78649,94687) (78691,19687) (78697,79687) (78779,97787) (78781,18787) (78787,78787) (78809,90887) (78823,32887) (78839,93887) (78887,78887) (78889,98887) (78893,39887) (78901,10987) (78929,92987) (78979,97987) (79039,93097) (79063,36097) (79103,30197) (79111,11197) (79147,74197) (79229,92297) (79231,13297) (79309,90397) (79319,91397) (79349,94397) (79379,97397) (79393,39397) (79397,79397) (79399,99397) (79411,11497) (79423,32497) (79427,72497) (79451,15497) (79531,13597) (79537,73597) (79549,94597) (79559,95597) (79589,98597) (79609,90697) (79621,12697) (79631,13697) (79669,96697) (79687,78697) (79691,19697) (79697,79697) (79757,75797) (79769,96797) (79777,77797) (79811,11897) (79841,14897) (79843,34897) (79847,74897) (79873,37897) (79889,98897) (79907,70997) (79939,93997) (79973,37997) (79997,79997) (90001,10009) (90007,70009) (90019,91009) (90023,32009) (90031,13009) (90059,95009) (90089,98009) (90121,12109) (90127,72109) (90149,94109) (90163,36109) (90199,99109) (90217,71209) (90247,74209) (90263,36209) (90271,17209) (90373,37309) (90397,79309) (90473,37409) (90499,99409) (90547,74509) (90647,74609) (90679,97609) (90697,79609) (90709,90709) (90731,13709) (90749,94709) (90793,39709) (90803,30809) (90821,12809) (90833,33809) (90863,36809) (90887,78809) (90901,10909) (90911,11909) (90917,71909) (90971,17909) (90989,98909) (91009,90019) (91019,91019) (91121,12119) (91129,92119) (91183,38119) (91193,39119) (91199,99119) (91229,92219) (91249,94219) (91283,38219) (91291,19219) (91303,30319) (91397,79319) (91453,35419) (91459,95419) (91493,39419) (91541,14519) (91571,17519) (91621,12619) (91631,13619) (91673,37619) (91711,11719) (91781,18719) (91837,73819) (91867,76819) (91921,12919) (91943,34919) (91951,15919) (91967,76919) (92003,30029) (92033,33029) (92041,14029) (92077,77029) (92119,91129) (92143,34129) (92153,35129) (92189,98129) (92219,91229) (92227,72229) (92297,79229) (92311,11329) (92317,71329) (92333,33329) (92357,75329) (92369,96329) (92381,18329) (92383,38329) (92401,10429) (92459,95429) (92479,97429) (92489,98429) (92503,30529) (92507,70529) (92639,93629) (92641,14629) (92657,75629) (92683,38629) (92707,70729) (92753,35729) (92761,16729) (92779,97729) (92789,98729) (92821,12829) (92831,13829) (92861,16829) (92867,76829) (92893,39829) (92899,99829) (92941,14929) (92959,95929) (92987,78929) (92993,39929) (93001,10039) (93083,38039) (93097,79039) (93103,30139) (93113,31139) (93139,93139) (93151,15139) (93187,78139) (93199,99139) (93239,93239) (93257,75239) (93283,38239) (93377,77339) (93407,70439) (93481,18439) (93487,78439) (93493,39439) (93503,30539) (93557,75539) (93559,95539) (93581,18539) (93601,10639) (93607,70639) (93629,92639) (93683,38639) (93701,10739) (93739,93739) (93763,36739) (93811,11839) (93871,17839) (93887,78839) (93893,39839) (93901,10939) (93911,11939) (93923,32939) (93937,73939) (93941,14939) (93971,17939) (93997,79939) (94033,33049) (94049,94049) (94109,90149) (94111,11149) (94121,12149) (94151,15149) (94153,35149) (94169,96149) (94207,70249) (94219,91249) (94261,16249) (94291,19249) (94349,94349) (94351,15349) (94397,79349) (94399,99349) (94441,14449) (94447,74449) (94483,38449) (94541,14549) (94543,34549) (94559,95549) (94573,37549) (94597,79549) (94603,30649) (94613,31649) (94649,94649) (94651,15649) (94687,78649) (94709,90749) (94723,32749) (94771,17749) (94781,18749) (94793,39749) (94837,73849) (94849,94849) (94889,98849) (94903,30949) (94907,70949) (94949,94949) (95003,30059) (95009,90059) (95087,78059) (95101,10159) (95111,11159) (95131,13159) (95143,34159) (95153,35159) (95203,30259) (95213,31259) (95231,13259) (95267,76259) (95279,97259) (95287,78259) (95317,71359) (95393,39359) (95401,10459) (95419,91459) (95429,92459) (95479,97459) (95483,38459) (95527,72559) (95539,93559) (95549,94559) (95597,79559) (95621,12659) (95731,13759) (95747,74759) (95791,19759) (95801,10859) (95803,30859) (95813,31859) (95881,18859) (95911,11959) (95929,92959) (95947,74959) (95959,95959) (95971,17959) (96001,10069) (96013,31069) (96017,71069) (96053,35069) (96149,94169) (96157,75169) (96179,97169) (96181,18169) (96221,12269) (96263,36269) (96269,96269) (96281,18269) (96289,98269) (96323,32369) (96329,92369) (96337,73369) (96377,77369) (96431,13469) (96443,34469) (96469,96469) (96517,71569) (96553,35569) (96587,78569) (96671,17669) (96697,79669) (96769,96769) (96797,79769) (96823,32869) (96827,72869) (96847,74869) (96857,75869) (96893,39869) (96907,70969) (96911,11969) (96953,35969) (97001,10079) (97007,70079) (97169,96179) (97187,78179) (97259,95279) (97327,72379) (97367,76379) (97373,37379) (97379,97379) (97381,18379) (97397,79379) (97423,32479) (97429,92479) (97441,14479) (97459,95479) (97463,36479) (97511,11579) (97523,32579) (97571,17579) (97579,97579) (97609,90679) (97651,15679) (97711,11779) (97729,92779) (97787,78779) (97789,98779) (97841,14879) (97861,16879) (97879,97879) (97961,16979) (97987,78979) (98009,90089) (98017,71089) (98081,18089) (98123,32189) (98129,92189) (98207,70289) (98221,12289) (98251,15289) (98257,75289) (98269,96289) (98299,99289) (98317,71389) (98389,98389) (98407,70489) (98411,11489) (98429,92489) (98473,37489) (98491,19489) (98507,70589) (98533,33589) (98543,34589) (98573,37589) (98597,79589) (98621,12689) (98627,72689) (98689,98689) (98711,11789) (98717,71789) (98729,92789) (98731,13789) (98779,97789) (98801,10889) (98849,94889) (98873,37889) (98887,78889) (98897,79889) (98909,90989) (98993,39989) (98999,99989) (99023,32099) (99053,35099) (99109,90199) (99119,91199) (99133,33199) (99139,93199) (99173,37199) (99181,18199) (99223,32299) (99251,15299) (99289,98299) (99317,71399) (99349,94399) (99397,79399) (99401,10499) (99409,90499) (99431,13499) (99563,36599) (99571,17599) (99611,11699) (99661,16699) (99713,31799) (99721,12799) (99793,39799) (99817,71899) (99829,92899) (99877,77899) (99881,18899)
Листинг получен прикрепленной ниже версией этой учебной программки. Она отличается тем, что дублирует вывод в файл ssimple.txt и разбивает его на строки. Некоторые нужные в не-учебном софте проверки корректности также не делаются (удалось ли открыть файл; хватит ли 20 символов в строках ns, nos для представления чисел).
SSIMPLE.PAS (1 Кб)
23.04.2009, 19:10 [12633 просмотра]