-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path2674.py
More file actions
38 lines (30 loc) · 749 Bytes
/
2674.py
File metadata and controls
38 lines (30 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
def primo(x):
lim =int( x ** 0.5)
cont = 0
for i in range (1, lim+1):
if x % i == 0:
cont+=1
if cont > 1:
break
if cont > 1 or x == 1 or x == 0:
return False
else:
return True
while True:
try:
ent = input()
sup = True
prim = primo(int(ent))
if prim == False :
print ("Nada")
else:
for i in ent:
if primo(int (i)) == False:
sup = False
break
if sup :
print ("Super")
else:
print ("Primo")
except:
break