Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Author : Saurav Kalsoor
- #Testcases for Minimum Moves
- ___________________________________________________________________________________________________________________________
- // Testcase : 1
- //Input :
- 9
- 123456789
- //Output :
- 53
- ___________________________________________________________________________________________________________________________
- // Testcase : 2
- //Input :
- 30
- 001678294039710047203946100020
- //Output :
- 115
- ___________________________________________________________________________________________________________________________
- // Testcase : 3
- //Input :
- 20
- 01783334845267178653
- //Output :
- 109
- ___________________________________________________________________________________________________________________________
- // Testcase : 4
- //Input :
- 50
- 42421172399613266285053410873987609699304762542632
- //Output :
- 266
- ___________________________________________________________________________________________________________________________
- // Testcase : 5
- //Input :
- 80
- 00349223628475477276902545806100800226457168911635857924989747296800705369774107
- //Output :
- 429
- ___________________________________________________________________________________________________________________________
- // Testcase : 6
- //Input :
- 100
- 4445315166054988852835883433662003290023409044487841291439464649375634194207305737655986223997316002
- //Output :
- 527
- ___________________________________________________________________________________________________________________________
- // Testcase : 7
- //Input :
- 150
- 248031197960475361765394877589747392714544546378605481690303231933716050117235635223093825032670143000920221558325897028636660524517056826706328201230
- //Output :
- 742
- ___________________________________________________________________________________________________________________________
- // Testcase : 8
- //Input :
- 180
- 398417819322810043987431817549283762614057877319940683006540235385619872492802643595358469811878433587658204792211945286831570095507378194576187052899863589144577652605551866380206
- //Output :
- 1018
- ___________________________________________________________________________________________________________________________
- // Testcase : 9
- //Input :
- 400
- 2884012728976529230818256710440819171823645757865085092136270738067429122480752931310936681704682954375638895048167027082685027031964730223234667700500112240528959563344407931475299676856792816520938244731744252071365678577460431901574557489472363150639346194294665722707172532540454460416255786714622458007313197085261188696432371534078249581886186557529977379045197094721744843364310047862190054278
- //Output :
- 2130
- ___________________________________________________________________________________________________________________________
- // Testcase : 10
- //Input :
- 1000
- 7117121752918577423707639794979584487943748499578051729348892518678717301121163927585868514090939645890770428746527747538193371094036159892249632859524692867761920829813923545681171753148338073109265371415783261902080854149817498279147129531003030395060053511164813827748399245059181213018541782811787350765622820739785972722443479252900601083079325177809987844252672048163825343175039114170266832236954530889166916203572940771960557634726089415040083209864765107976683708059708945084289342015441052202196682234110450451456840984075565148184576523021750780325218566035813465954129457809345341775282378001543632732506701114109292715084099740246720948591149124509353438169404314901811665589759721633695182495219996381618363772530433810384139788714690216343224663690280846488942361236417269307511444277501588717855202600215106959417087049648022592140634723058912282095288838611910856788408218242592648902693136447600818295703494980950942868951597473714010385694160642999870326981192918448132089690093204
- //Output :
- 5353
- ___________________________________________________________________________________________________________________________
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement