This time it was unrated
** Thoughts ** Just calculate. Pi can be implemented in math.pi
import math
r = int(input())
print(2*r*math.pi)
** Thoughts ** Just compare n and task with the amount of tasks as tasks
n, m = map(int,input().split())
a = list(map(int,input().split()))
task = sum(a)
if task <= n:
print(n-task)
else:
print(-1)
** Thoughts ** Calculate the number of subordinates for all $ i $.
n = int(input())
a = list(map(int,input().split()))
mem = [0] * (n)
for i in range(n-1):
mem[a[i]-1] += 1
for i in mem:
print(i)
It's hard to be unrated. I want to turn brown quickly. See you again, good night.
Recommended Posts