結果

問題 No.149 碁石の移動
ユーザー utsumidaisukeutsumidaisuke
提出日時 2018-12-14 13:20:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 11,864 KB
実行使用メモリ 21,712 KB
最終ジャッジ日時 2023-10-25 09:58:10
合計ジャッジ時間 1,798 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
14,180 KB
testcase_01 AC 37 ms
11,868 KB
testcase_02 AC 26 ms
10,096 KB
testcase_03 AC 29 ms
10,096 KB
testcase_04 AC 27 ms
10,096 KB
testcase_05 AC 45 ms
13,812 KB
testcase_06 AC 47 ms
14,684 KB
testcase_07 AC 27 ms
10,096 KB
testcase_08 AC 28 ms
10,200 KB
testcase_09 AC 35 ms
11,640 KB
testcase_10 AC 39 ms
13,104 KB
testcase_11 AC 45 ms
13,500 KB
testcase_12 AC 39 ms
13,624 KB
testcase_13 AC 37 ms
12,308 KB
testcase_14 AC 43 ms
12,392 KB
testcase_15 AC 52 ms
16,204 KB
testcase_16 AC 73 ms
21,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

aw, ab = map(int,input().split())
bw, bb = map(int,input().split())

tob, toa = map(int,input().split())

al = ["b" for i in range(ab)]+["w" for i in range(aw)]
bl = ["b" for i in range(bb)]+["w" for i in range(bw)]

alr = al[tob:]

bl += al[:tob]
bl.sort()
bl.reverse()

ll = bl[:toa]+alr
print(ll.count('w'))
0