結果
問題 | No.149 碁石の移動 |
ユーザー |
|
提出日時 | 2019-01-24 21:02:07 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 133 ms / 2,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 4,050 ms |
コンパイル使用メモリ | 74,408 KB |
実行使用メモリ | 41,324 KB |
最終ジャッジ日時 | 2024-09-16 04:42:54 |
合計ジャッジ時間 | 6,568 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
import java.util.Scanner; public class No149 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int aw = s.nextInt() , ab = s.nextInt() , bw = s.nextInt() , bb = s.nextInt() , c = s.nextInt() , d = s.nextInt(); s.close(); if(Math.min(ab, c) == ab){ aw -= c - ab; bw += c - ab; bb = ab; }else{ bb = c; } if(Math.min(bw, d) == bw){ aw += bw; }else{ aw += d; } System.out.println(aw); } }