CSES - HIIT Open 2019 - Results
Submission details
Task:Alien Invasion II
Sender:Barely div 1
Submission time:2019-05-25 11:36:26 +0300
Language:Python3
Status:READY
Result:
Test results
testverdicttime
#10.04 sdetails
#20.05 sdetails
#30.04 sdetails

Code

astr = str(input())
aint = int(astr)

import sys

if (aint % 2) == 0 and aint > 2:
  print(astr)
  print('2 ' + str(aint/2))
else:
  for i in range(1, 10**5):
    newstr = str(i) + astr
    newint = int(newstr)
    if (newint % 3) == 0 and newint > 3:
      print(newstr)
      print('3 ' + str(newint/3))
      sys.exit()
    if (newint % 5) == 0 and newint > 5:
      print(newstr)
      print('5 ' + str(newint/5))
      sys.exit()
    if (newint % 7) == 0 and newint > 7:
      print(newstr)
      print('7 ' + str(newint/7))
      sys.exit()
  

Test details

Test 1

Verdict:

input
2368469234876449

correct output
22368469234876449
3 7456156411625483

user output
22368469234876449
3 7456156411625483.0

Test 2

Verdict:

input
292929292929292929292929292931

correct output
129292929292929292929292929293...

user output
129292929292929292929292929293...

Test 3

Verdict:

input
292929292929292929292929292979

correct output
129292929292929292929292929297...

user output
129292929292929292929292929297...