結果
問題 | No.857 素振り |
ユーザー | Yosuke Yamaguchi |
提出日時 | 2021-01-21 22:42:45 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 578 bytes |
コンパイル時間 | 3,602 ms |
コンパイル使用メモリ | 73,328 KB |
実行使用メモリ | 56,396 KB |
最終ジャッジ日時 | 2023-08-26 14:12:02 |
合計ジャッジ時間 | 5,551 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 105 ms
56,396 KB |
testcase_01 | AC | 107 ms
55,588 KB |
testcase_02 | AC | 100 ms
55,992 KB |
testcase_03 | AC | 104 ms
55,592 KB |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
ソースコード
import java.util.Scanner; // https://yukicoder.me/problems/no/857 public class Suburi857 { public static void main(String[] args) { // 標準入力から読み込む際に、Scan Scanner sc = new Scanner(System.in); // String 1つ分を読み込む int x = Integer.parseInt(sc.next()); int y = Integer.parseInt(sc.next()); int z = Integer.parseInt(sc.next()); int rest = 0; if (z >= x) rest += 1; if (z >= y) rest += 1; int result = z - rest; if (result < 0) result = 0; System.out.println(result); } }