CSES - Datatähti 2021 alku - Results
Submission details
Task:2021-luvut
Sender:jogr
Submission time:2020-09-30 14:47:09 +0300
Language:C++11
Status:READY
Result:25
Feedback
groupverdictscore
#1ACCEPTED10
#2ACCEPTED15
#30
#40
Test results
testverdicttimegroup
#1ACCEPTED0.01 s1, 2, 3, 4details
#2ACCEPTED0.03 s1, 2, 3, 4details
#3ACCEPTED0.03 s1, 2, 3, 4details
#4ACCEPTED0.01 s1, 2, 3, 4details
#5ACCEPTED0.03 s1, 2, 3, 4details
#6ACCEPTED0.03 s1, 2, 3, 4details
#7ACCEPTED0.03 s1, 2, 3, 4details
#8ACCEPTED0.01 s1, 2, 3, 4details
#9ACCEPTED0.03 s1, 2, 3, 4details
#10ACCEPTED0.03 s1, 2, 3, 4details
#11ACCEPTED0.02 s2, 3, 4details
#12ACCEPTED0.01 s2, 3, 4details
#13ACCEPTED0.01 s2, 3, 4details
#14ACCEPTED0.01 s2, 3, 4details
#15ACCEPTED0.01 s2, 3, 4details
#16ACCEPTED0.01 s2, 3, 4details
#17ACCEPTED0.01 s2, 3, 4details
#18ACCEPTED0.01 s2, 3, 4details
#19ACCEPTED0.02 s2, 3, 4details
#20ACCEPTED0.06 s2, 3, 4details
#210.01 s3, 4details
#220.01 s3, 4details
#230.01 s3, 4details
#240.01 s3, 4details
#250.01 s3, 4details
#260.01 s3, 4details
#270.01 s3, 4details
#280.01 s3, 4details
#290.01 s3, 4details
#300.01 s3, 4details
#310.01 s4details
#320.01 s4details
#330.01 s4details
#340.01 s4details
#350.01 s4details
#360.01 s4details
#370.01 s4details
#380.01 s4details
#390.01 s4details
#400.01 s4details

Compiler report

input/code.cpp: In function 'bool is_valid(long long int)':
input/code.cpp:14:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int ci = 0; ci < ns.length(); ci++) {
                      ~~~^~~~~~~~~~~~~

Code

#include <iostream>
#include <string>
#include <cmath>

using namespace std;


int lu[] = { 205621, 420210, 1202162, 1240210, 1920210, 2007291, 2016721, 2021142, 2021642, 2022313, 2024181, 2026139, 2028071, 2029831, 2038214, 2047219, 2056261, 2065421, 2074921, 2084211, 2093216, 2102914, 2184021, 2207271, 2302126, 2330211, 2402541, 2470021, 2505213, 2601212, 2610217, 2702211, 2750213, 2802941, 2890201, 2907821, 3200261, 3209421, 3620321, 4202561, 4270201, 5120321, 5208217, 5520921, 6202341, 6259021, 7020921, 7206821, 7426021, 8202192, 8246021, 8926021, 9205231, 9352021, 10202152, 10233021, 10852021, 11204201, 11312021, 12002213, 12012181, 12020251, 12021362, 12021862, 12023172, 12025130, 12027016, 12028812, 12032301, 12042196, 12052173, 12062150, 12072127, 12082104, 12092001, 12101212, 12110217, 12202211, 12250213, 12302941, 12390201, 12407821, 12502134, 12530219, 12602611, 12670215, 12705231, 12801221, 12810271, 12902219, 12950231, 13202514, 13262021, 14120218, 14208021, 14520261, 15202312, 15250821, 16020261, 16206251, 16420521, 17202182, 17240521, 17920521, 18205211, 18322021, 19202142, 19230291, 19822021, 20007021, 20016212, 20021122, 20021622, 20022212, 20024161, 20026119, 20027961, 20029721, 20037241, 20046291, 20055721, 20065201, 20074214, 20083219, 20092917, 20102813, 20112701, 20120851, 20121476, 20121976, 20123619, 20125415, 20127211, 20129160, 20132901, 20142761, 20152621, 20162516, 20172412, 20182291, 20192195, 20200318, 20201376, 20201876, 20203186, 20205144, 20207102, 20208881, 20210208, 20210708, 20211208, 20211708, 20212208, 20212708, 20213208, 20213708, 20214208, 20214708, 20215208, 20215708, 20216208, 20216708, 20217208, 20217708, 20218208, 20218708, 20219208, 20219708, 20220641, 20221437, 20221937, 20223418, 20225214, 20227163, 20229121, 20230981, 20231498, 20231998, 20233741, 20235518, 20237314, 20239182, 20241059, 20241559, 20242140, 20244081, 20245841, 20247618, 20249414, 20251120, 20251620, 20252210, 20254159, 20256117, 20257941, 20259718, 20261181, 20261681, 20262514, 20264310, 20266178, 20268136, 20270041, 20271242, 20271742, 20272818, 20274614, 20276410, 20278197, 20280155, 20281303, 20281803, 20283113, 20284918, 20286714, 20288510, 20290271, 20291364, 20291864, 20293174, 20295132, 20297018, 20298814, 20302311, 20312198, 20320331, 20321379, 20321879, 20323189, 20325147, 20327105, 20328910, 20332381, 20342241, 20352190, 20362167, 20372144, 20382121, 20392081, 20401421, 20410921, 20420013, 20421233, 20421733, 20422801, 20424561, 20426321, 20428188, 20432018, 20441231, 20450281, 20459621, 20469121, 20478213, 20487218, 20496251, 20505321, 20514821, 20521087, 20521587, 20522168, 20524126, 20526012, 20527791, 20529551, 20536215, 20545221, 20554271, 20563521, 20573021, 20582861, 20592721, 20602616, 20612512, 20620681, 20621441, 20621941, 20623441, 20625218, 20627167, 20629125, 20632712, 20642591, 20652451, 20662319, 20672215, 20682183, 20692160, 20702137, 20712114, 20720147, 20721295, 20721795, 20723105, 20724910, 20726671, 20728431, 20732152, 20742129, 20752106, 20762011, 20771214, 20780219, 20789261, 20798421, 20807921, 20817211, 20821149, 20821649, 20822321, 20824188, 20826146, 20828104, 20829901, 20838231, 20847281, 20856621, 20866121, 20875213, 20884218, 20893251, 20902931, 20912817, 20921003, 20921503, 20922012, 20923791, 20925551, 20927319, 20929187, 20933215, 20942913, 20952801, 20962661, 20972521, 20982416, 20992312, 21002199, 21012176, 21020218, 21021357, 21021857, 21023167, 21025125, 21027011, 21028781, 21032251, 21042191, 21052168, 21062145, 21072122, 21082091, 21091521, 21101021, 21110212, 21202197, 21250121, 21302917, 21387021, 21407321, 21502129, 21530214, 21602571, 21670210, 21705216, 21801215, 21810221, 21902214, 21950216, 22002971, 22012831, 22021007, 22021507, 22022016, 22023812, 22025591, 22027351, 22029191, 22033219, 22042917, 22052813, 22062701, 22072561, 22082421, 22092316, 22102212, 22150214, 22202951, 22290210, 22307921, 22402135, 22430221, 22502612, 22570216, 22605241, 22701231, 22710281, 22802221, 22850241, 22903210, 22990218, 23008214, 23017219, 23021157, 23021657, 23022401, 23024196, 23026154, 23028112, 23029917, 23038421, 23047921, 23057211, 23066216, 23075231, 23084281, 23093621, 23103121, 23190216, 23208212, 23302141, 23330281, 23402618, 23470241, 23505321, 23601291, 23610721, 23702281, 23750321, 23803216, 23890261, 23908221, 24002149, 24012126, 24020159, 24021307, 24021807, 24023117, 24024941, 24026718, 24028514, 24032164, 24042141, 24052118, 24062051, 24071281, 24080621, 24090121, 24099213, 24108218, 24202147, 24230721, 24302661, 24370321, 24405921, 24501821, 24514021, 24602313, 24650921, 24703241, 24790521, 24808281, 24902155, 24936021, 25002713, 25012601, 25020751, 25021457, 25021957, 25023519, 25025315, 25027183, 25029141, 25032801, 25042661, 25052521, 25062416, 25072312, 25082199, 25092176, 25102153, 25134021, 25202711, 25270921, 25306212, 25402013, 25420021, 25502319, 25556021, 25603321, 25692021, 25708721, 25802161, 25840201, 25902719, 25978021, 26006221, 26015271, 26021107, 26021607, 26022188, 26024146, 26026104, 26027901, 26029661, 26037021, 26046212, 26055217, 26064241, 26073291, 26082971, 26092831, 26102717, 26176021, 26206218, 26302019, 26320213, 26402371, 26460201, 26503921, 26598021, 26609210, 26702167, 26740215, 26802771, 26880211, 26906281, 27002091, 27011521, 27020109, 27021257, 27021757, 27022914, 27024710, 27026471, 27028231, 27032114, 27042019, 27051241, 27060291, 27069721, 27079201, 27088214, 27097219, 27106261, 27202071, 27220219, 27302412, 27360215, 27404212, 27500211, 27509216, 27602173, 27640231, 27702812, 27780217, 27806721, 27902105, 27920291, 28002421, 28012316, 28020511, 28021407, 28021907, 28023281, 28025175, 28027133, 28029019, 28032516, 28042412, 28052291, 28062195, 28072172, 28082149, 28092126, 28102103, 28120271, 28202418, 28260231, 28304218, 28400217, 28409241, 28502179, 28540291, 28602818, 28680251, 28707210, 28802111, 28820821, 28902481, 28960421, 29004281, 29013621, 29021057, 29021557, 29022138, 29024061, 29025821, 29027616, 29029412, 29035213, 29044218, 29053251, 29062931, 29072817, 29082713, 29092601, 29102461, 29160291, 29204261, 29300251, 29309321, 29402185, 29440821, 29502861, 29580421, 29607216, 29702117, 29725021, 29802513, 29861021, 29904721, 30020421, 30206321, 30421021, 31202187, 31241021, 31921021, 32008261, 32017421, 32021167, 32021667, 32022419, 32024215, 32026164, 32028122, 32029991, 32039211, 32048216, 32057231, 32066281, 32075621, 32085121, 32094213, 32103218, 32190281, 32208241, 32302151, 32332021, 32402701, 32470721, 32506210, 32602011, 32618021, 32702317, 32754021, 32803281, 32890921, 32908521, 33201231, 33210281, 33720021, 34202711, 34270921, 35200201, 35209214, 35620213, 36202501, 36260621, 37120213, 37207521, 37520219, 38202281, 38250321, 39020219, 39206218, 39420271, 40202177, 40240271, 40920271, 41204921, 41320621, 42002319, 42012215, 42020410, 42021387, 42021887, 42023197, 42025155, 42027113, 42028918, 42032415, 42042311, 42052198, 42062175, 42072152, 42082129, 42092106, 42102011, 42118021, 42202317, 42254021, 42303281, 42390921, 42408521, 42502159, 42540021, 42602717, 42676021, 42706218, 42802019, 42820213, 42902371, 42960201, 43202621, 43270261, 44129021, 44208721, 44582021, 45202418, 45260231, 46082021, 46207221, 46520201, 47202216, 47250218, 48020201, 48206121, 48420215, 49202167, 49240215, 49920215, 50204261, 50320231, 51202127, 51230212, 51820231, 52006221, 52015271, 52021107, 52021607, 52022188, 52024146, 52026104, 52027901, 52029661, 52037021, 52046212, 52055217, 52064241, 52073291, 52082971, 52092831, 52102717, 52176021, 52206218, 52302019, 52320213, 52402371, 52460201, 52503921, 52598021, 52609210, 52702167, 52740215, 52802771, 52880211, 52906281, 53120821, 53208241, 53525021, 54202391, 54260211, 55025021, 55207210, 55442021, 56202197, 56250121, 56942021, 57205281, 57402021, 58202157, 58238021, 58902021, 59204214, 59320211, 60202117, 60225021, 60820211, 61202951, 61290210, 62002169, 62012146, 62020179, 62021327, 62021827, 62023137, 62025051, 62026819, 62028615, 62032184, 62042161, 62052138, 62062115, 62072021, 62081251, 62090321, 62099821, 62109210, 62202167, 62240215, 62302771, 62380211, 62406281, 62502091, 62520231, 62602414, 62660217, 62704214, 62800213, 62809218, 62902175, 62940251, 63202317, 63254021, 64020421, 64206321, 64421021, 65202187, 65241021, 65921021, 66205216, 66327021, 67202147, 67230721, 67827021, 68203721, 68296021, 69202107, 69220421, 69762021, 70202913, 70283021, 71201231, 71210281, 71720021, 72004216, 72013231, 72021047, 72021547, 72022128, 72024014, 72025810, 72027571, 72029331, 72034621, 72044121, 72053213, 72062911, 72072781, 72082641, 72092518, 72102414, 72160217, 72204214, 72300213, 72309218, 72402175, 72440251, 72502814, 72580219, 72606921, 72702107, 72720421, 72802441, 72860271, 72904241, 73020219, 73206218, 73420271, 74202177, 74240271, 74920271, 75204921, 75320621, 76202137, 76230241, 76820621, 77203241, 77290521, 78202071, 78220219, 78723021, 79202841, 79280291, 80201211, 80210216, 80629021, 81202621, 81270261, 82002109, 82012014, 82020119, 82021267, 82021767, 82022961, 82024721, 82026516, 82028312, 82032124, 82042101, 82051721, 82061201, 82070214, 82079219, 82088261, 82097421, 82106921, 82202107, 82220421, 82302441, 82360271, 82404241, 82500231, 82509281, 82602183, 82640621, 82702841, 82780291, 82807214, 82902115, 82923021, 83202167, 83240215, 83920215, 84204261, 84320231, 85202127, 85230212, 85820231, 86203212, 86290221, 87202015, 87220201, 87720291, 88202812, 88280217, 89200421, 89209921, 89620821, 90202610, 90270214, 91120821, 91208241, 91525021, 92002861, 92012721, 92020915, 92021487, 92021987, 92023711, 92025481, 92027241, 92029171, 92032921, 92042816, 92052712, 92062591, 92072451, 92082319, 92092215, 92102183, 92140621, 92202841, 92280291, 92307214, 92402115, 92423021, 92502511, 92560821, 92604521, 92700421, 92709921, 92802191, 92845021, 92902911, 92981021, 93204214, 93320211, 94202117, 94225021, 94820211, 95202951, 95290210, 96201621, 96212021, 96720217, 97202731, 97280021, 98200219, 98209261, 98620251, 99202519, 99267021, 100120251, 100208212, 100520421, 101202317, 101254021, 102000621, 102010121, 102019213, 102021207, 102021707, 102022631, 102024417, 102026213, 102028162, 102031218, 102040251, 102049321, 102058821, 102068210, 102077215, 102086221, 102095271, 102104521, 102200421, 102209921, 102302191, 102345021, 102402911, 102481021, 102507241, 102602123, 102630121, 102702519, 102767021, 102805210, 102901201, 102910214, 103202107, 103220421, 103762021, 104202913, 104283021, 105201231, 105210281, 105720021, 106202711, 106270921, 107200201, 107209214, 107620213, 108202501, 108260621, 109120213, 109207521, 109520219, 110202281, 110250321, 111020219, 111206218, 111420271, 112002531, 112012417, 112020612, 112021427, 112021927, 112023391, 112025195, 112027153, 112029111, 112032617, 112042513, 112052401, 112062261, 112072192, 112082169, 112092146, 112102123, 112130121, 112202519, 112267021, 112305210, 112401201, 112410214, 112502199, 112550210, 112602919, 112689021, 112707521, 112802131, 112830216, 112902591, 112970212, 113202841, 113280291, 114201211, 114210216, 114629021, 115202621, 115270261, 116129021, 116208721, 116582021, 117202418, 117260231, 118082021, 118207221, 118520201, 119202216, 119250218, 120000211, 120009216, 120018231, 120021187, 120021687, 120022521, 120024316, 120026184, 120028142, 120030281, 120039621, 120049121, 120058213, 120067218, 120076251, 120085321, 120094821, 120104210, 120113215, 120121041, 120121541, 120122122, 120123991, 120125751, 120127519, 120129315, 120134271, 120143521, 120153021, 120162861, 120172721, 120182616, 120192512, 120200681, 120201441, 120201941, 120203441, 120205218, 120207167, 120209125, 120210273, 120210773, 120211273, 120211773, 120212273, 120212773, 120213273, 120213773, 120214273, 120214773, 120215273, 120215773, 120216273, 120216773, 120217273, 120217773, 120218273, 120218773, 120219273, 120219773, 120221002, 120221502, 120222011, 120223781, 120225541, 120227318, 120229186, 120231063, 120231563, 120232144, 120234102, 120235881, 120237641, 120239418, 120241124, 120241624, 120242214, 120244163, 120246121, 120247981, 120249741, 120251185, 120251685, 120252518, 120254314, 120256182, 120258140, 120260081, 120261246, 120261746, 120262841, 120264618, 120266414, 120268210, 120270159, 120271307, 120271807, 120273117, 120274941, 120276718, 120278514, 120280310, 120281368, 120281868, 120283178, 120285136, 120287041, 120288818, 120290614, 120291429, 120291929, 120293410, 120295197, 120297155, 120299113, 120302619, 120312515, 120320710, 120321444, 120321944, 120323471, 120325231, 120327170, 120329128, 120332715, 120342611, 120352481, 120362341, 120372218, 120382186, 120392163, 120402140, 120412117, 120420150, 120421298, 120421798, 120423108, 120424913, 120426701, 120428461, 120432155, 120442132, 120452109, 120462014, 120471217, 120480241, 120489291, 120498721, 120508201, 120517214, 120521152, 120521652, 120522351, 120524191, 120526149, 120528107, 120529912, 120538261, 120547421, 120556921, 120566211, 120575216, 120584231, 120593281, 120602961, 120612821, 120621006, 120621506, 120622015, 120623811, 120625581, 120627341, 120629190, 120633218, 120642916, 120652812, 120662691, 120672551, 120682419, 120692315, 120702211, 120712179, 120720231, 120721360, 120721860, 120723170, 120725128, 120727014, 120728810, 120732281, 120742194, 120752171, 120762148, 120772125, 120782102, 120791821, 120801210, 120810215, 120819221, 120821214, 120821714, 120822701, 120824461, 120826221, 120828169, 120831271, 120840521, 120850021, 120859212, 120868217, 120877241, 120886291, 120895721, 120905201, 120914214, 120921068, 120921568, 120922149, 120924107, 120925912, 120927691, 120929451, 120935261, 120944421, 120953921, 120963211, 120972901, 120982761, 120992621, 121002516, 121012412, 121020581, 121021422, 121021922, 121023341, 121025190, 121027148, 121029106, 121032612, 121042491, 121052351, 121062219, 121072187, 121082164, 121092141, 121102118, 121126021, 121202514, 121262021, 121304821, 121400721, 121410201, 121502194, 121548021, 121602914, 121684021, 121707271, 121802126, 121830211, 121902541, 121970021, 122005213, 122014218, 122021072, 122021572, 122022153, 122024111, 122025916, 122027712, 122029491, 122035321, 122044821, 122054210, 122063215, 122072913, 122082801, 122092661, 122102521, 122168021, 122205211, 122301210, 122310215, 122402201, 122450211, 122502921, 122590021, 122607621, 122702132, 122730217, 122802601, 122870213, 122905219, 123001218, 123010251, 123019321, 123021222, 123021722, 123022717, 123024513, 123026301, 123028177, 123031821, 123041210, 123050215, 123059221, 123068271, 123077521, 123087021, 123096212, 123105217, 123201216, 123210231, 123302215, 123350217, 123402981, 123490213, 123508201, 123602138, 123630251, 123702615, 123770219, 123805271, 123901261, 123910421, 124002251, 124012191, 124020314, 124021372, 124021872, 124023182, 124025140, 124027081, 124028841, 124032319, 124042215, 124052183, 124062160, 124072137, 124082114, 124092019, 124101241, 124110291, 124202231, 124250251, 124303211, 124390219, 124408215, 124502144, 124530421, 124602631, 124670271, 124705621, 124801521, 124811021, 124902310, 124950621, 125003219, 125012917, 125021022, 125021522, 125022103, 125023891, 125025651, 125027419, 125029215, 125033921, 125043211, 125052901, 125062761, 125072621, 125082516, 125092412, 125102291, 125150421, 125203217, 125290271, 125308231, 125402150, 125431021, 125502691, 125570621, 125606201, 125702010, 125717021, 125802316, 125853021, 125903271, 125990821, 126008421, 126017921, 126021172, 126021672, 126022461, 126024221, 126026169, 126028127, 126030211, 126039216, 126048231, 126057281, 126066621, 126076121, 126085213, 126094218, 126103251, 126190621, 126208291, 126302156, 126337021, 126402714, 126473021, 126506215, 126602016, 126620210, 126702341, 126759021, 126803621, 126895021, 126909021, 127002164, 127012141, 127020174, 127021322, 127021822, 127023132, 127025018, 127026814, 127028610, 127032179, 127042156, 127052133, 127062110, 127072015, 127081218, 127090251, 127099321, 127108821, 127202162, 127240210, 127302721, 127379021, 127406231, 127502041, 127520216, 127602401, 127660212, 127704201, 127800121, 127809213, 127902170, 127940218, 128002801, 128012661, 128020819, 128021472, 128021972, 128023615, 128025411, 128027198, 128029156, 128032861, 128042721, 128052616, 128062512, 128072391, 128082251, 128092191, 128102168, 128140216, 128202781, 128280212, 128306291, 128402100, 128420241, 128502415, 128560218, 128604215, 128700214, 128709219, 128802176, 128840261, 128902815, 128980221, 129007021, 129016212, 129021122, 129021622, 129022212, 129024161, 129026119, 129027961, 129029721, 129037241, 129046291, 129055721, 129065201, 129074214, 129083219, 129092917, 129102813, 129180218, 129206821, 129302106, 129320321, 129402431, 129460261, 129504231, 129600221, 129609271, 129702182, 129740521, 129802831, 129880281, 129907213, 130172021, 130209201, 130620121, 131202451, 131260281, 132001321, 132010821, 132020012, 132021232, 132021732, 132022791, 132024551, 132026319, 132028187, 132032017, 132041221, 132050271, 132059521, 132069021, 132078212, 132087217, 132096241, 132105291, 132201281, 132210621, 132302271, 132350291, 132403215, 132490251, 132508219, 132602148, 132630821, 132702671, 132770421, 132806021, 132901921, 132915021, 133202132, 133230217, 133820281, 134203217, 134290271, 135202021, 135220214, 135720721, 136202817, 136280241, 137200921, 137210211, 137624021, 138202615, 138270219, 139124021, 139208291, 139532021, 140202413, 140260216, 141032021, 141207215, 141492021, 142002691, 142012551, 142020718, 142021452, 142021952, 142023514, 142025310, 142027178, 142029136, 142032751, 142042619, 142052515, 142062411, 142072281, 142082194, 142092171, 142102148, 142130821, 142202671, 142270421, 142306021, 142401921, 142415021, 142502314, 142551021, 142603251, 142690621, 142708291, 142802156, 142837021, 142902714, 142973021, 143203021, 143290215, 144202010, 144217021, 144720241, 145202781, 145280212, 146200261, 146209421, 146620321, 147202561, 147270201, 148120321, 148208217, 148520921, 149202341, 149259021, 150020921, 150206821, 150426021, 151202192, 151246021, 151926021, 152008421, 152017921, 152021172, 152021672, 152022461, 152024221, 152026169, 152028127, 152030211, 152039216, 152048231, 152057281, 152066621, 152076121, 152085213, 152094218, 152103251, 152190621, 152208291, 152302156, 152337021, 152402714, 152473021, 152506215, 152602016, 152620210, 152702341, 152759021, 152803621, 152895021, 152909021, 153201281, 153210621, 153720212, 154202716, 154275021, 155200214, 155209219, 155620218, 156202514, 156262021, 157120218, 157208021, 157520261, 158202312, 158250821, 159020261, 159206251, 159420521, 160202182, 160240521, 160920521, 161205211, 161322021, 162002361, 162012221, 162020415, 162021392, 162021892, 162023211, 162025160, 162027118, 162028951, 162032421, 162042316, 162052212, 162062180, 162072157, 162082134, 162092111, 162102016, 162120210, 162202341, 162259021, 162303621, 162395021, 162409021, 162502164, 162540212, 162602741, 162680121, 162706251, 162802061, 162820218, 162902411, 162960214, 163202671, 163270421, 164172021, 164209201, 164620121, 165202451, 165260281, 166120121, 166207271, 166520214, 167202231, 167250251, 168020214, 168206213, 168420221, 169202172, 169240221, 169920221, 170204421, 170320281, 171202132, 171230217, 171820281, 172006271, 172015521, 172021112, 172021612, 172022193, 172024151, 172026109, 172027914, 172029710, 172037212, 172046217, 172055241, 172064291, 172073721, 172083201, 172092881, 172102741, 172180121, 172206251, 172302061, 172320218, 172402411, 172460214, 172504211, 172600210, 172609215, 172702172, 172740221, 172802811, 172880216, 172906621, 173124021, 173208291, 173532021, 174202413, 174260216, 175032021, 175207215, 175492021, 176202211, 176250213, 176992021, 177205621, 177420210, 178202162, 178240210, 178920210, 179204219, 179320216, 180202122, 180230021, 180820216, 181203021, 181290215, 182002174, 182012151, 182020184, 182021332, 182021832, 182023142, 182025100, 182026861, 182028621, 182032189, 182042166, 182052143, 182062120, 182072071, 182081321, 182090821, 182100210, 182109215, 182202172, 182240221, 182302811, 182380216, 182406621, 182502104, 182520281, 182602419, 182660241, 182704219, 182800218, 182809251, 182902180, 182940321, 183202341, 183259021, 184020921, 184206821, 184426021, 185202192, 185246021, 185926021, 186205231, 186352021, 187202152, 187233021, 187852021, 188204201, 188312021, 189202112, 189220921, 189812021, 190202918, 190288021, 191201281, 191210621, 191720212, 192004231, 192013281, 192021052, 192021552, 192022133, 192024019, 192025815, 192027611, 192029381, 192035121, 192044213, 192053218, 192062916, 192072812, 192082691, 192092551, 192102419, 192160241, 192204219, 192300218, 192309251, 192402180, 192440321, 192502819, 192580261, 192607211, 192702112, 192720921, 192802491, 192860521, 192904291, 193020261, 193206251, 193420521, 194202182, 194240521, 194920521, 195205211, 195322021 };

bool is_valid(long long num) {
    char checklist[] = { '2', '0', '2', '1' };
    int index = 0;
    string ns = to_string(num);
    for (int ci = 0; ci < ns.length(); ci++) {
        if (index == 4) return true;
        if (ns[ci] == checklist[index]) {
            index++;
        }

    }
    if (index == 4) return true;
    else            return false;
}

// solve the numbers with a reference point every 500 2021-numbers

int main() {
    long long n; // the n:th to be found
    cin >> n;

    long long output = 0; // the - output..

    long long start_index = (int)((float)n / (float)500) - 1;

    long long cn = (start_index + 1) * 500; // current nth
    if (start_index > -1) cn--;

    long long start = (start_index > -1) ? lu[start_index] : 2021;

    for (long long i = start; i < pow(10, 12); i++) {
        if (is_valid(i)) {
            cn++;
            //cout <<cn << " : " << i << endl;
        }
        if (cn == n && is_valid(i)) {
            output = i;
            break;
        }

    }

    cout << output;

    return 0;
}

Test details

Test 1

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
10

correct output
20214

user output
20214

Test 2

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
359

correct output
202661

user output
202661

Test 3

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
392

correct output
202819

user output
202819

Test 4

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
715

correct output
230721

user output
230721

Test 5

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
278

correct output
202219

user output
202219

Test 6

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
296

correct output
202318

user output
202318

Test 7

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
427

correct output
203214

user output
203214

Test 8

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
565

correct output
208212

user output
208212

Test 9

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
289

correct output
202311

user output
202311

Test 10

Group: 1, 2, 3, 4

Verdict: ACCEPTED

input
342

correct output
202581

user output
202581

Test 11

Group: 2, 3, 4

Verdict: ACCEPTED

input
964486

correct output
182502018

user output
182502018

Test 12

Group: 2, 3, 4

Verdict: ACCEPTED

input
110979

correct output
20296916

user output
20296916

Test 13

Group: 2, 3, 4

Verdict: ACCEPTED

input
759149

correct output
126108721

user output
126108721

Test 14

Group: 2, 3, 4

Verdict: ACCEPTED

input
234934

correct output
25023210

user output
25023210

Test 15

Group: 2, 3, 4

Verdict: ACCEPTED

input
610310

correct output
120288133

user output
120288133

Test 16

Group: 2, 3, 4

Verdict: ACCEPTED

input
956690

correct output
182027419

user output
182027419

Test 17

Group: 2, 3, 4

Verdict: ACCEPTED

input
608459

correct output
120281827

user output
120281827

Test 18

Group: 2, 3, 4

Verdict: ACCEPTED

input
944777

correct output
175260251

user output
175260251

Test 19

Group: 2, 3, 4

Verdict: ACCEPTED

input
880780

correct output
152270421

user output
152270421

Test 20

Group: 2, 3, 4

Verdict: ACCEPTED

input
418357

correct output
68202361

user output
68202361

Test 21

Group: 3, 4

Verdict:

input
713294506861

correct output
20099206371786

user output
(empty)

Test 22

Group: 3, 4

Verdict:

input
191431126351

correct output
4193020274761

user output
(empty)

Test 23

Group: 3, 4

Verdict:

input
778422318223

correct output
20247733120134

user output
(empty)

Test 24

Group: 3, 4

Verdict:

input
931090767075

correct output
20691282041612

user output
(empty)

Test 25

Group: 3, 4

Verdict:

input
198806129726

correct output
4275365802196

user output
(empty)

Test 26

Group: 3, 4

Verdict:

input
724343399444

correct output
20128443204610

user output
(empty)

Test 27

Group: 3, 4

Verdict:

input
105064053560

correct output
2350677231115

user output
(empty)

Test 28

Group: 3, 4

Verdict:

input
236866700902

correct output
5872395029521

user output
(empty)

Test 29

Group: 3, 4

Verdict:

input
696349488695

correct output
20034225603103

user output
(empty)

Test 30

Group: 3, 4

Verdict:

input
30929267826

correct output
1205256095901

user output
(empty)

Test 31

Group: 4

Verdict:

input
576379198814226780

correct output
4185251600926331891

user output
(empty)

Test 32

Group: 4

Verdict:

input
291698664446913099

correct output
2280132983584730156

user output
(empty)

Test 33

Group: 4

Verdict:

input
693146378550043345

correct output
5270258230724009910

user output
(empty)

Test 34

Group: 4

Verdict:

input
685982323362439932

correct output
5236052744416920782

user output
(empty)

Test 35

Group: 4

Verdict:

input
838865925103308874

correct output
6800200426815679149

user output
(empty)

Test 36

Group: 4

Verdict:

input
766426223219980635

correct output
6112960212822572807

user output
(empty)

Test 37

Group: 4

Verdict:

input
652970397451919317

correct output
4923188580186259818

user output
(empty)

Test 38

Group: 4

Verdict:

input
188458586650539464

correct output
1903508375720755921

user output
(empty)

Test 39

Group: 4

Verdict:

input
157646989818721527

correct output
1525038392797601315

user output
(empty)

Test 40

Group: 4

Verdict:

input
898606361978236778

correct output
7326676702587314407

user output
(empty)