結果
問題 | No.857 素振り |
ユーザー | N.Matsumoto |
提出日時 | 2019-09-21 21:02:05 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 465 bytes |
コンパイル時間 | 2,147 ms |
コンパイル使用メモリ | 73,984 KB |
実行使用メモリ | 57,472 KB |
最終ジャッジ日時 | 2023-10-19 06:47:28 |
合計ジャッジ時間 | 4,322 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 137 ms
57,472 KB |
testcase_01 | AC | 139 ms
57,388 KB |
testcase_02 | AC | 138 ms
57,036 KB |
testcase_03 | AC | 137 ms
57,380 KB |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int rest01 = sc.nextInt(); int rest02 = sc.nextInt(); int num = sc.nextInt(); int res = 0; int cnt = 1; while (cnt <= num) { if (cnt != rest01 && cnt != rest02) { res++; } cnt++; } System.out.print(res); } }