Back
Close

Reverse this (not-so-)Secret Algorithm

Statement

 Goal

Given N plaintext message LINE , convert each to long m in the form used by RSA.

In RSA, the hex value of each character's ASCII value is taken and padded into a single string. This string is then converted to long.

For example, take the string: Hi!


Char | ASCII | Hex
---------------------------
H | 72 | 48
i | 105 | 69
! | 33 | 21

So, our hex-string is "486921".
Converting this to long, we get:
4745505 --> Answer.
Input
Integer N;
N plaintext strings follow, each called LINE.
Output
N longs.
Constraints
0 < N <= 100
length(LINE) <= 10000
Example
Input
1
Hello World!
Output
22405534230753928650781647905

Game modes
Fastest

Test cases
Hello World! Test
Input
1 Hello World!
Output
22405534230753928650781647905

Hello World!++ Validator
Input
1 Hello World! This is my first contribution to Codingame! Hope you enjoy! ^-^
Output
300409099533702831792165637305727796765011746209634085679644970806466674342187085906101292248012141762814603769475157467724173181888411880808108445635116566441742254057630453118938462

Lorem Ipsum Test
Input
11 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Output
31443674788578543435628628298390989484049599558217650899270333484 10471757114190431668389816282200597169847094529144707330378369168428 52195120188548167862331324142427531479068947150452711314870739349724261084788 13600200018321813405162861560761035335367499129092893080514057901228447839379758 2095316649112304996062476005444597096322944737139610447148 712191427827189532493340249891807924030523527074758129184622 11246939638239116745443357492305020227998447803090105716 44065893537778204377294520788197597365531443179660051843051614276174391374894 8715794571958339788795859423896712619004405266869700253403337164736942417804073436615698804 52432879745533366711326650514425846526329013125173833270871934768472164074684673218802277 636859210251954254537279215597453789423740306550824367387182

Lorem Ipsum - Extended Validator
Input
13 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ne vitationem quidem doloris ipsam per se quisquam in rebus expetendis putavit, nisi etiam evitare posset. Duo Reges: constructio interrete. Cum autem progrediens confirmatur animus, agnoscit ille quidem naturae vim, sed ita, ut progredi possit longius, per se sit tantum inchoata. Nec tamen ille erat sapiens quis enim hoc aut quando aut ubi aut unde?
Output
31443674788578543435628628298390989484049599558217650899270333484 10471757114190431668389816282200597169847094529144707330378369168430 8255959905520981641789914744745663952030848087663706612188929223027 727715031432117338481718391892694150705811469575131222514146007736022387 700323411338603477290652518124073042547401265685806050975900148139909485 163044026214494169307189964185175250667464390688643202534437690 44975854338689098143357980528800626321488951563277454909449123803970223236461 198676673787019075688110099963170630936837424191691947323832276151369560876 11278616001805580674818078288837901396222360224982655869546279504436167675833644 224176334222874580236779276562498172410181056981344021636171553338137575092110050554668 46237144732752125916357479586084698361400971378469645798652272942 38988174226608567159257803427583612623344048413756725185124453446582465415121917298239853 47237340422720340574658964879088928031174869327418852302777385385325349856575

¯\_(ツ)_/¯ Test
Input
1 ¯\_(ツ)_/¯
Output
828118091741020928552879

Some more Emoticons Validator
Input
11 ¯\_(ツ)_/¯ (/◕ヮ◕)/ ಠ_ಠ (◉ω◉) (*^_^*) (✿◠‿◠) ^_^; ^o^; (。>﹏<。) (ノಠ益ಠ) ◕‿◕
Output
828118091741020928552879 189764382425198995253551 3389389984 180808724852885801 11305583883725353 189618632623088111837225 1583308347 1584356923 193605586371268258521385 741386733440641835049 41597299271125

Spacious Test
Input
9 Codingame is one of the most famous tech-recruiting platforms!
Output
1243958509297322782053 26995 7302757 28518 7628901 1836020596 112568633881971 604362834789480639160441104763547239 530904316791708720132897

Super Spacious Validator
Input
20 fAmKz NM.dbI"\.f,3 L$~-Q3.W?>f"v\:ca{8D cz:}m!!'kD^l.z46nqev @B-qE*~\:N?4\?J~ccV, v7OekADZp3x4qAvP25Bx f<>W'rRqnvL]tUdLV$<n {\R(wvYXz!H;R;w#pcJ$ .]]skkB{?7yL'i2;oyQf />q eK.fw8EBtIuaH2Tm v*-:(lTlu$No31F0u8SR ZVF%?n 5KP*bB=/rq !k EK!,adT90f;EL9A%h'>. 'pn0k[u!sum692rtL{AV O4aMwM~tA5NhM?~CIzBj *OW{q~5>Xz(3/(f$'"t\ M]8Sz8w)r^Zxh[!8=m|$ eKi@Z.<xc`Z)oT+%:`%t p!~F`K&|MX)nAd*eFh5c a[[8]N&s~(Y,EDr6g8Wx 8n|";W$SG@pRXj`dS,'a
Output
142523468746391386580235044020589213956977435 434697116978426034209750911002416968968223537220 567915872418718625913462325563614395859658171766 366851217112540513023271429693961425661783660076 674894368324806197420468315936155028549814010488 583660533954670645939252148519703881911753784430 704264690347130794659504076389549348424662600228 264695685479208135394260549060478993021273723238 16857194204642421059974126752016287128987260013 674601482098527160864405749154181990703791887186 2014582593734365213583708362600506113056645483 395595808884050670047515000706546362930575130158 225157922352073547324420380671192555854650622294 452178385897465051624734684237841521208513413738 241546992019750446497970937880746969849976222812 441671165350806625330150120644135319117146979364 578289792431062498207968517765986505860826801524 640153891019610713974088763346339534122259068259 555809418980835040956303913249541247370652047224 322167378709906313827854049307856191345958594401

Solution language

Solution

Stub generator input