• Sign Up
• Login
• API
• FAQ
• Tools
• Trends
• Archive
daily pastebin goal
12%
SHARE
TWEET

# Untitled

a guest May 17th, 2018 93 in 23 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1.
2. print("2(Fast), 3 (Medium) or 4(Very long calculation)?")
3. h = int(input())
4. if h == 2:
5.     print("From 1 to...?")
6.     y = int(input())
7.     d = 1
8.     c = 1
9.     while c < 2:
10.         import random
11.         a = random.randint(1,y)
12.         b = random.randint(1,y)
13.         if a == b:
14.             d = (d+1)
15.             print("YES  ", d,"Num", a)
16.             break
17.         else:
18.             d = (d+1)
19.             print("NO   ", d)
20. if h == 3:
21.     print("From 1 to...?")
22.     y = int(input())
23.     d = 1
24.     c = 1
25.     while c < 2:
26.         import random
27.         a = random.randint(1,y)
28.         b = random.randint(1,y)
29.         e = random.randint(1,y)
30.         if a == b == e:
31.             d = (d+1)
32.             print("YES  ", d,"Num", a)
33.             break
34.         else:
35.             d = (d+1)
36.             print("NO   ", d)
37. if h == 4:
38.     print("From 1 to...?")
39.     y = int(input())
40.     d = 1
41.     c = 1
42.     while c < 2:
43.         import random
44.         a = random.randint(1,y)
45.         b = random.randint(1,y)
46.         e = random.randint(1,y)
47.         k = random.randint(1,y)
48.         if a == b == e == k:
49.             d = (d+1)
50.             print("YES  ", d,"Num", a)
51.
52.             break
53.         else:
54.             d = (d+1)
55.             print("NO   ", d)
RAW Paste Data
Top