結果

問題 No.149 碁石の移動
ユーザー soupesuteakasoupesuteaka
提出日時 2016-03-03 17:03:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 9,360 KB
最終ジャッジ日時 2023-08-25 17:43:07
合計ジャッジ時間 1,266 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
9,360 KB
testcase_01 AC 21 ms
9,224 KB
testcase_02 AC 21 ms
9,332 KB
testcase_03 AC 22 ms
9,164 KB
testcase_04 AC 24 ms
9,216 KB
testcase_05 AC 22 ms
9,172 KB
testcase_06 AC 23 ms
9,332 KB
testcase_07 AC 22 ms
9,180 KB
testcase_08 AC 23 ms
9,336 KB
testcase_09 AC 23 ms
9,168 KB
testcase_10 AC 22 ms
9,180 KB
testcase_11 AC 21 ms
9,332 KB
testcase_12 AC 22 ms
9,216 KB
testcase_13 AC 21 ms
9,160 KB
testcase_14 AC 23 ms
9,332 KB
testcase_15 AC 22 ms
9,180 KB
testcase_16 AC 23 ms
9,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: UTF-8

import sys
import re
import itertools
from math import log
from collections import deque

### defs ###


### main ###
A = list(map(int,sys.stdin.readline().split()))
B = list(map(int,sys.stdin.readline().split()))
C,D = map(int, sys.stdin.readline().split())
A[0] -= max(0, C-A[1])
B[0] += max(0, C-A[1])
A[0] += min(D, B[0])
print(A[0])
0