結果

問題 No.149 碁石の移動
ユーザー m2543315647m2543315647
提出日時 2015-05-14 16:02:15
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 296 bytes
コンパイル時間 3,384 ms
コンパイル使用メモリ 71,888 KB
実行使用メモリ 58,076 KB
最終ジャッジ日時 2023-09-20 07:43:18
合計ジャッジ時間 6,677 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 127 ms
55,796 KB
testcase_03 AC 130 ms
55,824 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 130 ms
55,824 KB
testcase_08 AC 129 ms
55,776 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 130 ms
55,560 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 130 ms
55,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No149 {
	public static void main (String[] args){
	Scanner sc =new Scanner(System.in);
	int aw=sc.nextInt() ,ab=sc.nextInt();
	int bw=sc.nextInt();
	int c=sc.nextInt(),d=sc.nextInt();
	bw-=ab<c?ab-c:0;
	System.out.println(aw+(bw<d?bw:d)+(ab<c?ab-c:0));
	}
}
0