File tree 14 files changed +85
-4
lines changed
14 files changed +85
-4
lines changed Original file line number Diff line number Diff line change
1
+ a , b , c = map (int , input ().split ())
2
+ print (c - min ((a - b ), c ))
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ ans = 0
3
+ for i in range (1 , n + 1 ):
4
+ if len (str (i ))% 2 == 1 :
5
+ ans += 1
6
+ print (ans )
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ h = list (map (int , input ().split ()))
3
+
4
+ for i in range (1 ,n ):
5
+ if h [i - 1 ]- h [i ]> 0 :
6
+ print ('No' )
7
+ exit ()
8
+ elif h [i - 1 ]- h [i ] <= - 1 :
9
+ h [i ] -= 1
10
+ print ('Yes' )
11
+
Original file line number Diff line number Diff line change
1
+ a , b = map (int , input ().split ())
2
+ print (max (a + b , a - b , a * b ))
Original file line number Diff line number Diff line change
1
+ k , x = map (int , input ().split ())
2
+ ans = [str (i ) for i in range (x - k + 1 , x + k )]
3
+ print (' ' .join (ans ))
Original file line number Diff line number Diff line change
1
+ from collections import Counter
2
+ n = int (input ())
3
+ s = [tuple (sorted (input ())) for _ in range (n )]
4
+
5
+ c = Counter (s )
6
+ ans = 0
7
+ for i in c .values ():
8
+ ans += i * (i - 1 )// 2
9
+ print (ans )
Original file line number Diff line number Diff line change
1
+ a = int (input ())
2
+ s = input ()
3
+ if a >= 3200 :
4
+ print (s )
5
+ else :
6
+ print ('red' )
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ a = map (lambda x : 1 / int (x ), input ().split ())
3
+ print (1 / sum (a ))
Original file line number Diff line number Diff line change
1
+ from collections import deque
2
+ n = int (input ())
3
+ v = deque (sorted (list (map (int , input ().split ()))))
4
+ for i in range (n - 1 ):
5
+ v1 = v .popleft ()
6
+ v2 = v .popleft ()
7
+ v .appendleft ((v1 + v2 )/ 2 )
8
+ print (v [0 ])
Original file line number Diff line number Diff line change
1
+ s = input ()
2
+ t = input ()
3
+ ans = 0
4
+ for i in range (len (s )):
5
+ if s [i ]== t [i ]:
6
+ ans += 1
7
+ print (ans )
Original file line number Diff line number Diff line change
1
+ import math
2
+ a , b = map (int , input ().split ())
3
+ n = 1
4
+ ans = 0
5
+ while n < b :
6
+ for i in range (1 , n + 1 ):
7
+ n += a - 1
8
+ ans += 1
9
+ if n >= b :
10
+ break
11
+ print (ans )
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ h = list (map (int , input ().split ()))
3
+ ans = 0
4
+ cnt = 0
5
+ for i in range (1 ,n ):
6
+ if h [i - 1 ]>= h [i ]:
7
+ cnt += 1
8
+ else :
9
+ cnt = 0
10
+ ans = max (ans , cnt )
11
+ print (ans )
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ print ((n - 1 )* (n )// 2 )
Original file line number Diff line number Diff line change @@ -95,10 +95,10 @@ AtCoderの問題をpython3で解いたものになります。AC確認は行っ
95
95
| [ ABC133] ( ABC/ABC133 ) | [ &check ; ] ( ABC/ABC133/A.py ) | [ &check ; ] ( ABC/ABC133/B.py ) | [ &check ; ] ( ABC/ABC133/C.py ) ||||| [ ABC173] ( ABC/ABC173 ) | [ &check ; ] ( ABC/ABC173/A.py ) | [ &check ; ] ( ABC/ABC173/B.py ) | [ &check ; ] ( ABC/ABC173/C.py ) | [ &check ; ] ( ABC/ABC173/D.py ) |||
96
96
| [ ABC134] ( ABC/ABC134 ) | [ &check ; ] ( ABC/ABC134/A.py ) | [ &check ; ] ( ABC/ABC134/B.py ) | [ &check ; ] ( ABC/ABC134/C.py ) ||||| ABC174|||||||
97
97
| [ ABC135] ( ABC/ABC135 ) | [ &check ; ] ( ABC/ABC135/A.py ) | [ &check ; ] ( ABC/ABC135/B.py ) | [ &check ; ] ( ABC/ABC135/C.py ) ||||| ABC175|||||||
98
- | ABC136||| |||||[ ABC176] ( ABC/ABC176 ) | [ &check ; ] ( ABC/ABC176/A.py ) | [ &check ; ] ( ABC/ABC176/B.py ) | [ &check ; ] ( ABC/ABC176/C.py ) ||||
99
- | ABC137||| ||||
100
- | ABC138||| ||||
101
- | ABC139|||| |||
98
+ | [ ABC136] ( ABC/ABC136 ) | [ & check ; ] ( ABC/ABC136/A.py ) | [ & check ; ] ( ABC/ABC136/B.py ) | [ & check ; ] ( ABC/ABC136/C.py ) ||||| [ ABC176] ( ABC/ABC176 ) | [ &check ; ] ( ABC/ABC176/A.py ) | [ &check ; ] ( ABC/ABC176/B.py ) | [ &check ; ] ( ABC/ABC176/C.py ) ||||
99
+ | [ ABC137] ( ABC/ABC137 ) | [ & check ; ] ( ABC/ABC137/A.py ) | [ & check ; ] ( ABC/ABC137/B.py ) | [ & check ; ] ( ABC/ABC137/C.py ) ||||
100
+ | [ ABC138] ( ABC/ABC138 ) | [ & check ; ] ( ABC/ABC138/A.py ) | [ & check ; ] ( ABC/ABC138/B.py ) | [ & check ; ] ( ABC/ABC138/C.py ) ||||
101
+ | [ ABC139] ( ABC/ABC139 ) | [ & check ; ] ( ABC/ABC139/A.py ) | [ & check ; ] ( ABC/ABC139/B.py ) | [ & check ; ] ( ABC/ABC139/C.py ) | [ & check ; ] ( ABC/ABC139/D.py ) |||
102
102
| ABC140|||||||
103
103
| ABC141|||||||
104
104
| ABC142|||||||
You can’t perform that action at this time.
0 commit comments