-
Notifications
You must be signed in to change notification settings - Fork 0
/
Level2_if.py
70 lines (56 loc) · 1007 Bytes
/
Level2_if.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Step 1: No.1330
# test
ex = '1 2'
ex = '10 2'
ex = '5 5'
A, B = map(int, ex.split())
# submit
A,B = map(int, input().split())
if A > B:
print('>')
elif A < B:
print('<')
else:
print('==')
# Step 2: No.9498
score = int(input())
if score >= 90 and score <= 100:
print('A')
elif score >= 80 and score < 90:
print('B')
elif score >= 70 and score < 80:
print('C')
elif score >= 60 and score < 70:
print('D')
else:
print('F')
# Step 3: No.2753
year = int(input())
if (year % 4 == 0) and (year%100 != 0 or year%400 == 0):
print('1')
else:
print('0')
# Step 4: No.14681
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')
# Step 4: No.2884
H,M = map(int, input().split())
if M >= 45:
M = M - 45
print(H,M)
elif H > 0 and M < 45:
H = H-1
M = M + 15
print(H,M)
else:
H = 23
M = M + 15
print(H,M)