Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1)
- n = int(input())
- for i in range(n+1):
- if i % 3 == 0 and i % 6 != 0:
- print(i,end = ' ')
- #Ответ: 3 9 15
- #2)
- n = int(input())
- for i in range(10,n+1):
- if (i % 10) % 2 == 0:
- print(i,end = ' ')
- #Ответ: 10 12 14 16
- #3)
- n = int(input())
- count = 0
- s = 0
- if n % 2 == 0:
- for i in range(1,n+1):
- if i % 2 == 0:
- count += 1
- print(count)
- else:
- for i in range(1,n+1):
- if i % 2 != 0:
- s += i
- print(s)
- #Ответ: 50 2500
- #4)
- n = int(input())
- count = 0
- if n % 3 == 0:
- m = int(input())
- for i in range(1,n+1):
- if i % m == 0:
- count += 1
- print(count)
- else:
- for i in range(1,n + 1):
- print(n ** i, end = ' ')
- #Ответ: 8 64 512 4096 32768 262144 2097152 16777216 14
- #5)
- count = 0
- a = int(input())
- b = int(input())
- n = int(input())
- for i in range(n):
- x = int(input())
- if x % 3 == 0 or x % 4 == 0 and x > 10:
- if x**2 == a ** 2 + b ** 2:
- count += 1
- print(count)
- #Ответ: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement