1d array clear

This commit is contained in:
2020-04-20 20:43:48 +09:00
parent c3d8d721b3
commit 7c20c34a76
8 changed files with 41 additions and 4 deletions

View File

@@ -0,0 +1,3 @@
input()
A = list(map(int, input().split() ) )
print(min(A), max(A))

View File

@@ -0,0 +1,11 @@
x = int(input())
y = int(input())
if x > 0 and y > 0:
print(1)
elif x < 0 and y > 0:
print(2)
elif x < 0 and y < 0:
print(3)
else:
print(4)

View File

@@ -0,0 +1,9 @@
A = [int(input()) for i in range(9)]
I = 0
M = 0
for i, v in enumerate(A):
if v > M:
I = i
M = v
print(M)
print(I+1)

View File

@@ -0,0 +1,6 @@
h, m = map(int, input().split())
if m < 45:
print((h-1)%24, 15+m)
else:
print(h, m-45)

View File

@@ -0,0 +1,11 @@
A = list(map(lambda x: x%42, (int(input()) for i in range(10))))
c = 0
for i in A:
if i == -1:
continue
for k in range(10):
if A[k] == i:
A[k] = -1
c += 1
print(c)

View File

@@ -1,6 +1,3 @@
"""
"""
import math
r = int(input())
print("%.6f"%round(r**2*math.pi,6))

View File

@@ -0,0 +1 @@
print(min(int(input())for i in range(3))+min(int(input())for i in range(2))-50)