| Task: | Alien Invasion II |
| Sender: | Naila |
| Submission time: | 2020-09-19 15:31:25 +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
import math
import sys
def Prime(n):
cnt = 0
for i in range(2, sys.maxsize):
if i > math.sqrt(n) and cnt < 1:
break
if n % i == 0:
cnt += 1
return cnt < 1
def Factors(n):
cnt = 0
x = 2
for i in range(2, sys.maxsize):
if i > math.sqrt(n) and cnt < 1:
break
x+=1
if n % i == 0:
print(i)
cnt+=1
print(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) |
