結果
問題 | No.333 門松列を数え上げ |
ユーザー | Taka |
提出日時 | 2016-04-03 22:47:39 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 532 bytes |
コンパイル時間 | 2,110 ms |
コンパイル使用メモリ | 73,936 KB |
実行使用メモリ | 54,448 KB |
最終ジャッジ日時 | 2024-04-10 11:05:14 |
合計ジャッジ時間 | 4,032 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 134 ms
54,368 KB |
testcase_01 | AC | 131 ms
54,448 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 138 ms
54,052 KB |
testcase_08 | AC | 132 ms
54,068 KB |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { // 標準入力から読み込む際に、Scannerオブジェクトを使う。 Scanner sc = new Scanner(System.in); // int 1つ分を読み込む int a = sc.nextInt(); // int 1つ分を読み込む int b = sc.nextInt(); int c=0; if(a<b){ c=a-1; }else if(a>b){ c=2000000000-a; } // 標準出力に書き出す。 System.out.println(c); } }