File tree Expand file tree Collapse file tree 5 files changed +85
-0
lines changed
Expand file tree Collapse file tree 5 files changed +85
-0
lines changed Original file line number Diff line number Diff line change 1+ # 내 풀이
2+ x = int (input ())
3+ y = int (input ())
4+
5+ if x > 0 and y > 0 :
6+ print ('1' )
7+ elif x < 0 and y > 0 :
8+ print ('2' )
9+ elif x < 0 and y < 0 :
10+ print ('3' )
11+ else :
12+ print ('4' )
Original file line number Diff line number Diff line change 1+ # 내 풀이
2+ A , B = map (int , input ().split ())
3+ C = int (input ())
4+
5+ if C < 60 :
6+ if B + C >= 60 :
7+ print ((A + 1 )% 24 , B + C - 60 )
8+ else :
9+ print (A % 24 , B + C )
10+ elif C == 60 :
11+ print (A + 1 , B )
12+ else :
13+ if B + (C % 60 ) >= 60 :
14+ print ((A + (C // 60 )+ 1 )% 24 , B + (C % 60 )- 60 )
15+ else :
16+ print ((A + (C // 60 ))% 24 , B + (C % 60 ))
17+
18+ # 다른 풀이
19+ A , B = map (int , input ().split ())
20+ C = int (input ())
21+
22+ A += C // 60
23+ B += C % 60
24+
25+ if B >= 60 :
26+ A += 1
27+ B -= 60
28+ if A >= 24 :
29+ A -= 24
30+
31+ print (A ,B )
Original file line number Diff line number Diff line change 1+ # 내 풀이
2+ H , M = map (int , input ().split ())
3+
4+ if M < 45 :
5+ H = H - 1
6+ M = M + 15
7+ if H < 0 :
8+ H = 23
9+ else :
10+ M = M - 45
11+
12+ print (H , M )
13+
14+ # 다른 풀이
15+ H ,M = map (int ,input ().split ())
16+
17+ if M > 44 :
18+ print (H , M - 45 )
19+ elif M < 45 and H > 0 :
20+ print (H - 1 ,M + 15 )
21+ else :
22+ print (23 ,M + 15 )
Original file line number Diff line number Diff line change 1+ # 내 풀이
2+ import sys
3+
4+ T = int (input ())
5+
6+ for i in range (T ):
7+ a , b = map (int , sys .stdin .readline ().split ())
8+ print (a + b )
Original file line number Diff line number Diff line change 1+ # 내 풀이
2+ n = int (input ())
3+
4+ sum = 0
5+ for i in range (1 , n + 1 ):
6+ sum += i
7+ print (sum )
8+
9+ # 다른 풀이
10+ n = int (input ())
11+
12+ print (sum (range (1 , n + 1 )))
You can’t perform that action at this time.
0 commit comments