Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //p1
- n = int(input())
- a = 30001
- for i in range(n):
- b = input()
- if b[len(b) - 1] == "4" and a > int(b):
- a = int(b)
- print(a)
- //p2
- for i in range(10, 100):
- a = i//10
- b = i%10
- if i==2*a*b:
- print(i)
- //p3
- import math;
- x = float(input())
- n = int(input())
- a = 0.0
- for i in range(0, n + 1):
- b =(-1)**(i)*(x**(2*i+1))/math.factorial(2*i+1)
- a = a + b
- print(a)
- //p4
- m,n = map(int, input().split())
- for i in range(m,n+1):
- b = 0
- for q in range(1, i + 1):
- if i % q == 0:
- b = b + q
- print(str(i)+": "+str(b))
- //p5
- n = int(input())
- for i in range(n, 0, -1):
- a = ""
- for q in range(i):
- a = a + "1"
- print(a)
- //p6
- n = int(input())
- for i in range(n + 1, n*2+1):
- for q in range(2, i):
- if i % q == 0:
- break
- else:
- print(i)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement