結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-19 15:20:33 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 117 ms / 2,000 ms |
| コード長 | 421 bytes |
| コンパイル時間 | 1,697 ms |
| コンパイル使用メモリ | 75,940 KB |
| 実行使用メモリ | 41,840 KB |
| 最終ジャッジ日時 | 2024-07-18 08:15:39 |
| 合計ジャッジ時間 | 4,245 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int aw=sc.nextInt(),ab=sc.nextInt(),bw=sc.nextInt(),bb=sc.nextInt(),c=sc.nextInt(),d=sc.nextInt();
sc.close();
if(ab<c){
aw-=c-ab;
bw+=c-ab;
}
if(bw>d)aw+=d;
else aw+=bw;
System.out.print(aw);
}
}