ITP1_1_A Hello World
Python
print("Hello World")
Python
n = int(input())
print(n**3)
Python
h, w = list(map(int, input().split()))
print(f"{h * w} {h+h+w+w}")
Python
S = int(input())
h = S // 3600
m = S % 3600 // 60
s = S % 60
print(f"{h}:{m}:{s}")
Python
a, b = list(map(int, input().split()))
if a<b:
print("a < b")
elif a>b:
print("a > b")
else:
print("a == b")
Python
a, b, c = list(map(int, input().split()))
if a<b<c:
print("Yes")
else:
print("No")
Python
A = list(map(int, input().split()))
for i in range(1, len(A)):
v = A[i]
j = i - 1
while j>=0 and A[j]>v:
A[j+1]=A[j]
j=j-1
A[j+1]=v
for i in range(0, len(A)):
if i<len(A)-1:
print(f"{A[i]} ", end='')
else:
print(f"{A[i]}")
Python
W, H, x, y, r = list(map(int, input().split()))
if 0<=x-r and x+r<=W and 0<=y-r and y+r<=H:
print("Yes")
else:
print("No")
Python
for i in range(0, 1000):
print("Hello World")
Python
n = 1
A = [0] * 1
while n > 0:
n = int(input())
A.append(n)
for i in range(1, len(A)):
if A[i] != 0:
print(f"Case {i}: {A[i]}")
Python
while True:
a, b = list(map(int, input().split()))
if a==0 and b==0:
break
else:
if a < b:
print(f"{a} {b}")
else:
print(f"{b} {a}")
Python
a, b, c = list(map(int, input().split()))
ans=0
for i in range(a, b+1):
if c % i == 0:
ans += 1
print(ans)
Python
a, b = list(map(int, input().split()))
print(f"{a//b} {a%b} {a/b:.5f}")
Python
import math as math
r = float(input())
print(f"{r*r*math.pi:.6f} {2*r*math.pi:.6f}")
Python
while True:
a, b, c = list(map(str, input().split()))
a = int(a)
c = int(c)
if b=='?':
break
elif b=='+':
print(f"{a+c}")
elif b=='-':
print(f"{a-c}")
elif b=='*':
print(f"{a*c}")
elif b=='/':
print(f"{a//c}")
Python
n = int(input())
a = list(map(int, input().split()))
Min = 1000000
Max = -1000000
Sum = 0
for i in range(0, n):
Min = min(Min, a[i])
Max = max(Max, a[i])
Sum += a[i]
print(f"{Min} {Max} {Sum}")
Recommended Posts