File tree 10 files changed +75
-4
lines changed
10 files changed +75
-4
lines changed Original file line number Diff line number Diff line change
1
+ k , x = map (int , input ().split ())
2
+
3
+ if k * 500 >= x :
4
+ print ('Yes' )
5
+ else :
6
+ print ('No' )
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ s = input ()
3
+ ans = 0
4
+ for i in range (n - 2 ):
5
+ if s [i :i + 3 ] == 'ABC' :
6
+ ans += 1
7
+ print (ans )
Original file line number Diff line number Diff line change
1
+ import numpy as np
2
+ from itertools import permutations
3
+ n = int (input ())
4
+ p = tuple (map (int , input ().split ()))
5
+ q = tuple (map (int , input ().split ()))
6
+ permu = [i for i in range (1 , n + 1 )]
7
+ permu = permutations (permu , n )
8
+
9
+ for i , s in enumerate (permu ):
10
+ if p == s :
11
+ a = i + 1
12
+ if q == s :
13
+ b = i + 1
14
+
15
+ print (abs (a - b ))
Original file line number Diff line number Diff line change
1
+ print (chr (ord (input ())+ 1 ))
Original file line number Diff line number Diff line change
1
+ n , k , m = map (int , input ().split ())
2
+ a = list (map (int , input ().split ()))
3
+
4
+ ans = max (0 , m * n - sum (a )) if m * n - sum (a )<= k else - 1
5
+ print (ans )
Original file line number Diff line number Diff line change
1
+ import numpy as np
2
+
3
+ n , m = map (int , input ().split ())
4
+ P = []
5
+ S = []
6
+ for i in range (m ):
7
+ p , s = input ().split ()
8
+ P .append (int (p ))
9
+ S .append (s )
10
+
11
+ flag = [0 for i in range (n )]
12
+ wa = [0 for i in range (n )]
13
+ for i in range (m ):
14
+ if S [i ] == 'AC' :
15
+ flag [P [i ]- 1 ] = 1
16
+ elif flag [P [i ]- 1 ] != 1 :
17
+ wa [P [i ]- 1 ] += 1
18
+
19
+ wa = sum (np .array (flag )* np .array (wa ))
20
+ print (sum (flag ), wa )
Original file line number Diff line number Diff line change
1
+ n , m = map (int , input ().split ())
2
+
3
+ if n == m :
4
+ print ('Yes' )
5
+ else :
6
+ print ('No' )
Original file line number Diff line number Diff line change
1
+ a , b = map (int , input ().split ())
2
+ print (str (min (a , b ))* max (a , b ))
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ p = list (map (int , input ().split ()))
3
+ ans = 0
4
+ mn = float ('inf' )
5
+ for i in range (n ):
6
+ mn = min (p [i ], mn )
7
+ if mn == p [i ]:
8
+ ans += 1
9
+ print (ans )
Original file line number Diff line number Diff line change @@ -108,10 +108,10 @@ AtCoderの問題をpython3で解いたものになります。AC確認は行っ
108
108
| [ ABC146] ( ABC/ABC146 ) | [ &check ; ] ( ABC/ABC146/A.py ) | [ &check ; ] ( ABC/ABC146/B.py ) | [ &check ; ] ( ABC/ABC146/C.py ) ||||
109
109
| [ ABC147] ( ABC/ABC147 ) | [ &check ; ] ( ABC/ABC147/A.py ) | [ &check ; ] ( ABC/ABC147/B.py ) |||||
110
110
| [ ABC148] ( ABC/ABC148 ) | [ &check ; ] ( ABC/ABC148/A.py ) | [ &check ; ] ( ABC/ABC148/B.py ) | [ &check ; ] ( ABC/ABC148/C.py ) | [ &check ; ] ( ABC/ABC148/D.py ) |||
111
- | ABC149||| ||||
112
- | ABC150||| ||||
113
- | ABC151||| ||||
114
- | ABC152||| ||||
111
+ | [ ABC149] ( ABC/ABC149 ) | [ & check ; ] ( ABC/ABC149/A.py ) | [ & check ; ] ( ABC/ABC149/B.py ) | [ & check ; ] ( ABC/ABC149/C.py ) ||||
112
+ | [ ABC150] ( ABC/ABC150 ) | [ & check ; ] ( ABC/ABC150/A.py ) | [ & check ; ] ( ABC/ABC150/B.py ) | [ & check ; ] ( ABC/ABC150/C.py ) ||||
113
+ | [ ABC151] ( ABC/ABC151 ) | [ & check ; ] ( ABC/ABC151/A.py ) | [ & check ; ] ( ABC/ABC151/B.py ) | [ & check ; ] ( ABC/ABC151/C.py ) ||||
114
+ | [ ABC152] ( ABC/ABC152 ) | [ & check ; ] ( ABC/ABC152/A.py ) | [ & check ; ] ( ABC/ABC152/B.py ) | [ & check ; ] ( ABC/ABC152/C.py ) ||||
115
115
| ABC153|||||||
116
116
| ABC154|||||||
117
117
| ABC155|||||||
You can’t perform that action at this time.
0 commit comments