結果

問題 No.149 碁石の移動
ユーザー m2543315647m2543315647
提出日時 2015-05-14 16:05:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 4,029 ms
コンパイル使用メモリ 72,356 KB
実行使用メモリ 56,432 KB
最終ジャッジ日時 2023-08-25 17:33:31
合計ジャッジ時間 7,125 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,816 KB
testcase_01 AC 127 ms
55,740 KB
testcase_02 AC 125 ms
55,776 KB
testcase_03 AC 125 ms
55,808 KB
testcase_04 AC 126 ms
55,516 KB
testcase_05 AC 124 ms
55,896 KB
testcase_06 AC 124 ms
55,712 KB
testcase_07 AC 126 ms
55,748 KB
testcase_08 AC 125 ms
55,892 KB
testcase_09 AC 124 ms
55,772 KB
testcase_10 AC 126 ms
55,788 KB
testcase_11 AC 124 ms
55,812 KB
testcase_12 AC 125 ms
55,792 KB
testcase_13 AC 126 ms
55,840 KB
testcase_14 AC 125 ms
55,688 KB
testcase_15 AC 124 ms
55,748 KB
testcase_16 AC 124 ms
56,432 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();
	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