結果
問題 | No.149 碁石の移動 |
ユーザー | kenji_shioya |
提出日時 | 2016-06-24 01:01:26 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 479 bytes |
コンパイル時間 | 3,294 ms |
コンパイル使用メモリ | 75,164 KB |
実行使用メモリ | 54,280 KB |
最終ジャッジ日時 | 2024-04-20 00:24:11 |
合計ジャッジ時間 | 6,153 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 129 ms
41,184 KB |
testcase_01 | AC | 124 ms
40,448 KB |
testcase_02 | AC | 135 ms
41,300 KB |
testcase_03 | AC | 131 ms
40,988 KB |
testcase_04 | AC | 108 ms
40,036 KB |
testcase_05 | AC | 133 ms
41,040 KB |
testcase_06 | AC | 131 ms
40,868 KB |
testcase_07 | AC | 140 ms
41,332 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 124 ms
40,932 KB |
testcase_11 | AC | 121 ms
40,060 KB |
testcase_12 | AC | 134 ms
40,788 KB |
testcase_13 | AC | 109 ms
40,524 KB |
testcase_14 | AC | 123 ms
41,120 KB |
testcase_15 | AC | 133 ms
41,132 KB |
testcase_16 | AC | 109 ms
39,904 KB |
ソースコード
import java.util.*; public class Exercise118{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int[] a = new int[2]; int[] b = new int[2]; a[0] = sc.nextInt(); a[1] = sc.nextInt(); b[0] = sc.nextInt(); b[1] = sc.nextInt(); int f = sc.nextInt(); int s = sc.nextInt(); b[0] += Math.min(f - a[1], a[0]); a[0] -= Math.min(f - a[1], a[0]); a[0] += Math.min(s, b[0]); System.out.println(a[0]); } }