結果
問題 | No.149 碁石の移動 |
ユーザー |
![]() |
提出日時 | 2017-06-22 16:12:45 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 397 bytes |
コンパイル時間 | 2,212 ms |
コンパイル使用メモリ | 74,536 KB |
実行使用メモリ | 55,976 KB |
最終ジャッジ日時 | 2024-10-02 12:18:43 |
合計ジャッジ時間 | 5,263 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 3 |
other | AC * 7 WA * 6 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int aw = sc.nextInt(); int ab = sc.nextInt(); int bw = sc.nextInt(); int bb = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); int ans = aw; ans -= Math.max(0, c - ab); ans += Math.min(bw, d); System.out.println(ans); } }