TÓPICO

Wrong Answer 10% 100% 1221 Python

XCipher perguntou 3 years ago

Hello , I want to solve this problem "1221 Fast Prime Number" using python 3 language , I try to solve it using lists concept this my code , and every time when I submit my code , I get "Wrong Answer 10% or 100%"

problem 1221 Fast Prime Number

box = []*10000 for i in range(1,10000): for j in range(2 ,i+1): if i == j : box.append(i)

    if i % j == 0 :
        break

case = int(input()) if case <=200 and case >= 1: cube = [None]*case for p in range(case): cube[p] = int(input())

for j in range(case):
    if cube[j] in box  :
        if cube[j] < 2**31 and cube[j] > 1 :
            print("Prime")
        else:
            break

    if cube[j] not in box :
        if  cube[j] < 2**31 and cube[j] > 1:
            print("Not Prime")
        else:
            break

Este tópico foi resolvido e não pode receber novas respostas.