ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2102. Michael and Cryptography

Test 23
Posted by Daniial 2 Nov 2020 06:33
Help please:
Test 23, whats wrong, what test should chek?

def sieve(n):
    lis = list(range(n + 1))
    lis[1] = 0
    for i in lis:
        if i > 1:
            for j in range(i + i, len(lis), i):
                lis[j] = 0
    return [i for i in lis if i != 0]
c = sieve(200)
a = int(input())
if a == 0:
    print('No')
i = 0
b = []
e = 0
while a != 1:
    if a%5 != 0 and a%2 != 0 and a%3 != 0:
        e +=1
        break

    elif a % c[i] == 0:
        a /= c[i]
        b.append(c[i])
        continue

    else:
        i += 1
d = str(len(b))
if  len (b) == 20 or (len (b) == 19 and e != 0):
    print('Yes')
else:
    print('No')