結果
| 問題 |
No.333 門松列を数え上げ
|
| コンテスト | |
| ユーザー |
matsuyoshi30
|
| 提出日時 | 2016-01-15 22:45:15 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 395 bytes |
| コンパイル時間 | 1,741 ms |
| コンパイル使用メモリ | 74,360 KB |
| 実行使用メモリ | 41,276 KB |
| 最終ジャッジ日時 | 2024-09-19 19:19:58 |
| 合計ジャッジ時間 | 3,222 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 WA * 2 |
ソースコード
import java.util.Scanner;
class Test {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str1 = in.next();
String str2 = in.next();
int A = Integer.parseInt(str1);
int B = Integer.parseInt(str2);
if(A > B) {
int m = 2000000000 - A;
int n = A - B - 1;
System.out.println(m + n);
}
if(A < B) {
System.out.println(A - 1);
}
}
}
matsuyoshi30