Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

MPRIME - Số nguyên tố ghép

Xét dãy A các số nguyên tố

2, 3, 5, 7, 11, 13, 17, 19,...

và dãy B gồm các số thu được từ dãy A bằng cách ghép hai số liên tiếp trong A:

23, 57, 1113, 1719, ...

Trong dãy B có những phần tử là số nguyên tố. Chẳng hạn 23, 3137, 8389, 157163...

Các số nguyên tố trong dãy B gọi là số nguyên tố ghép.

Yêu cầu: Cho trước số nguyên dương K ≤ 500, hãy tìm số nguyên tố ghép thứ K.

Dữ liệu

Gồm 1 số nguyên dương K duy nhất.

Kết qủa

In ra 1 số nguyên dương duy nhất là số nguyên tố ghép thứ K.

Ví dụ

Dữ liệu:
2

Kết qủa
3137

Được gửi lên bởi:Jimmy
Ngày:2008-01-05
Thời gian chạy:2s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:Tất cả ngoại trừ: ERL GOSU JS-RHINO NODEJS PERL6 PYPY RUST SED VB.NET
Nguồn bài:VNOI Marathon '08 - Practice Round

hide comments
2015-03-31 18:38:33
Cho 2 mảng A, B. Tạo 2 phần tử A rồi tạo 1 phần tử mảng B. Đến khi số phần tử B = K thì dừng rồi xuất luôn
2014-12-29 14:17:23 a lá sồ
AC :-)))
var k:longint;
a:array[1..500] of int64 =(23, 3137, 8389, 157163, 167173, 233239, 257263, 331337, 353359, 467479, 509521, 523541, 653659, 661673, 677683, 727733, 11871193, 12011213, 12591277, 13671373, 14531459, 16691693, 17091721, 17411747, 21792203, 22072213, 22812287, 23332339, 26212633, 26712677, 28972903, 29632969, 30673079, 32593271, 36373643, 37613767, 40994111, 43974409, 46034621, 46794691, 47334751, 47594783, 49194931, 55575563, 59275939, 63536359, 69776983, 73937411, 75837589, 78237829, 78837901, 79077919, 87618779, 90679091, 91879199, 92219227, 92939311, 96019613, 97699781, 98519857, 1086110867, 1139311399, 1171911731, 1254712553, 1272112739, 1303713043, 1361313619, 1424314249, 1474714753, 1519915217, 1524115259, 1537715383, 1560115607, 1574915761, 1576715773, 1641116417, 1669316699, 1674116747, 1678716811, 1693116937, 1729917317, 1753917551, 1795917971, 1832918341, 1843318439, 1871918731, 1901319031, 1921319219, 1928919301, 1957719583, 1986119867, 1991319919, 2071920731, 2116321169, 2140121407, 2191121929, 2205122063, 2217122189, 2275122769, 2287722901, 2380123813, 2385723869, 2404924061, 2407124077, 2409724103, 2415124169, 2425124281, 2511125117, 2512125127, 2517125183, 2544725453, 2545725463, 2566725673, 2584925867, 2617726183, 2632126339, 2639326399, 2650126513, 2653926557, 2672326729, 2678326801, 2729927329, 2750927527, 2831928349, 2880728813, 2892728933, 2933329339, 3051730529, 3088130893, 3101331019, 3105131063, 3165731663, 3179931817, 3234132353, 3247932491, 3260332609, 3283332839, 3291132917, 3350333521, 3360133613, 3362333629, 3459134603, 3468734693, 3496334981, 3526735279, 3559735603, 3596335969, 3699737003, 3736337369, 3751137517, 3765737663, 3925139293, 3930139313, 3955139563, 3986339869, 4017740189, 4028940343, 4045940471, 4059140597, 4060940627, 4073940751, 4099341011, 4122141227, 4204342061, 4233142337, 4245142457, 4246742473, 4273742743, 4354343573, 4402144027, 4402944041, 4450144507, 4475344771, 4508345119, 4543345439, 4555745569, 4582745833, 4615346171, 4752147527, 4756347569, 4801748023, 4887148883, 4922349253, 4952349529, 4987149877, 5017750207, 5022150227, 5042350441, 5077750789, 5125751263, 5148151487, 5185351859, 5230152313, 5296752973, 5371953731, 5377753783, 5413354139, 5443754443, 5466754673, 5479954829, 5584355849, 5609356099, 5626956299, 5668156687, 5704757059, 5773157737, 5780357809, 5856758573, 5922159233, 5956159567, 5995159957, 6001760029, 6147161483, 6172361729, 6242362459, 6336163367, 6337763389, 6346763473, 6352763533, 6362963647, 6401364019, 6428364301, 6479364811, 6512365129, 6541365419, 6555765563, 6599366029, 6654166553, 6665366683, 6728967307, 6742167427, 6744767453, 6796767979, 6809968111, 6817168207, 6843768443, 6896368993, 6903169061, 6959369623, 7006770079, 7048170487, 7134771353, 7184971861, 7230772313, 7268972701, 7290172907, 7330973327, 7352373529, 7354773553, 7369373699, 7370973721, 7382373847, 7396173973, 7402174027, 7407174077, 7409374099, 7435774363, 7445374471, 7450974521, 7474774759, 7521175217, 7532375329, 7552775533, 7598375989, 7625376259, 7828378301, 7869178697, 7975779769, 8016780173, 8031780329, 8042980447, 8065180657, 8098981001, 8134381349, 8214182153, 8340183407, 8343183437, 8401184017, 8413184137, 8482784857, 8510985121, 8551785523, 8560785619, 8579385817, 8601186017, 8613186137, 8614386161, 8710787119, 8718787211, 8905189057, 8911389119, 8944389449, 9043990469, 9054790583, 9067990697, 9084190847, 9091190917, 9180191807, 9187391909, 9264192647, 9271792723, 9292192927, 9337793383, 9342793463, 9352993553, 9360193607, 9513195143, 9526795273, 9544395461, 9600196013, 9637796401, 9655796581, 9695396959, 9725997283, 9793197943, 9877398779, 9898198993, 9934999367, 9976199767, 100043100049, 100703100733, 100811100823, 101341101347, 101477101483, 101873101879, 102149102161, 102587102593, 102983103001, 103511103529, 103613103619, 104207104231, 104417104459, 104723104729, 104947104953, 105031105037, 106123106129, 106243106261, 106307106319, 106373106391, 106531106537, 107021107033, 107641107647, 107981107999, 108089108107, 108517108529, 109891109897, 109943109961, 110441110459, 110927110933, 112019112031, 112061112067, 112261112279, 112831112843, 114013114031, 114547114553, 115727115733, 116101116107, 116141116159, 116747116789, 117659117671, 117991118033, 118621118633, 118891118897, 119191119227, 120181120193, 120623120641, 121351121357, 122971123001, 123493123499, 123619123631, 123887123911, 123983123989, 124291124297, 124529124541, 124543124561, 125063125093, 125527125539, 125753125777, 126199126211, 126751126757, 127703127709, 127763127781, 127819127837, 128341128347, 129737129749, 130057130069, 130643130649, 131507131519, 131743131749, 131849131861, 132257132263, 132541132547, 133321133327, 133451133481, 133657133669, 134741134753, 135271135277, 135449135461, 136261136273, 136373136379, 136483136501, 136999137029, 137119137131, 137353137359, 137363137369, 138059138071, 138739138763, 139133139169, 139837139861, 140557140587, 141551141587, 141833141851, 142537142543, 142973142979, 143357143387, 143419143443, 143477143483, 143779143791, 144593144611, 145213145219, 146173146191, 146477146513, 146701146719, 147151147163, 147179147197, 147481147487, 148249148279, 148381148387, 148793148817, 149893149899, 150197150203, 150517150523, 151051151057, 151433151451, 151597151603, 151787151799, 152519152531, 152909152939, 153457153469, 154823154841, 156707156719, 157679157721, 157733157739, 157901157907, 158329158341, 158791158803, 159023159059, 159073159079, 159473159491, 159541159553, 159773159779, 161033161039, 161047161053, 161971161977, 162017162053, 162119162143, 162209162221, 162451162457, 162671162677, 162823162829, 163243163249, 163259163307, 163627163633, 163847163853, 164267164279, 164309164321, 164963164987, 165161165173, 166247166259, 166357166363, 166931166949, 167261167267, 168937168943, 169321169327, 169483169489, 169633169639, 169859169889, 170341170347, 170551170557, 171673171679, 172993172999, 173933173969, 174653174659, 174703174721, 175361175391, 175853175859, 176237176243, 176611176629, 177211177217, 177257177269, 177791177797, 177811177823, 177943177949, 178489178501, 178819178831, 179651179657, 179693179717, 180247180259, 181669181693, 182537182549);
begin
readln(k);
writeln(a[k]);
end.
2014-12-23 03:26:52 Thắng Ðam Mê
hình như những ng nằm trong bảng xếp hạng mà thời gian chạy là 0.00 hình như là đã làm trước đó đến khi làm lại thì dùng kq đó cho vào mảng hằng :v
2014-10-31 14:37:06 Nguyễn A
dễ lắm, code 20 dòng
2014-10-26 14:08:53 Nguyễn Lê Lý Bằng
40đ? sai đâu c
2014-10-20 04:11:28 Gao Ðen~Bò Tót Mãnh Lực
sao dk co 10 diem :((
2014-09-29 16:08:44 Trần Anh Tú
mảng hằng chạy đúng hết kq mà sub 0đ,bài lỗi à
2014-08-25 10:14:43 ♥*.*♥MTP♥*.*♥
Đắng lòng thanh niên
2014-07-22 12:28:53 :((
182537182549 đây là kq đúng và bài này dùng mảng hang mới ko tle
2014-07-14 21:09:19 Noname
Chạy trên máy đủ các yêu cầu mà nộp bài toàn 0đ hoài.:((
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.