| Task: | Alien Invasion II |
| Sender: | Naila |
| Submission time: | 2020-09-19 15:41:53 +0300 |
| Language: | Python3 (CPython3) |
| Status: | READY |
| Result: | TIME LIMIT EXCEEDED |
| test | verdict | time | |
|---|---|---|---|
| #1 | TIME LIMIT EXCEEDED | -- | details |
| #2 | TIME LIMIT EXCEEDED | -- | details |
| #3 | TIME LIMIT EXCEEDED | -- | details |
Code
'''
Online Python Compiler.
Code, Compile, Run and Debug python program online.
Write your code in this editor and press "Run" button to execute it.
'''
import math
import sys
def Prime(n):
cnt = 0
i = 2
while(i <= math.sqrt(n) and cnt < 1):
if n % i == 0:
cnt += 1
i+=1
return cnt < 1
def Factors(n):
cnt = 0
x=2
i = 2
while(i <= math.sqrt(n) and cnt < 1):
x+=1
if n % i == 0:
print(i, end = ' ')
cnt+=1
i+=1
print(int(n/(x-1)))
if __name__ == '__main__':
n = int(input())
n1 = n
i = 1
b = Prime(n1)
while (b):
s = str(n)
s1 = str(i)
s = s1 + s
n1 = int(s)
b = Prime(n1)
i += 1
print(n1)
Factors(n1)
Test details
Test 1
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 2368469234876449 |
| correct output |
|---|
| 22368469234876449 3 7456156411625483 |
| user output |
|---|
| (empty) |
Test 2
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 292929292929292929292929292931 |
| correct output |
|---|
| 129292929292929292929292929293... |
| user output |
|---|
| (empty) |
Test 3
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 292929292929292929292929292979 |
| correct output |
|---|
| 129292929292929292929292929297... |
| user output |
|---|
| (empty) |
