結果

問題 No.395 永遠の17歳
ユーザー tentententen
提出日時 2020-09-29 13:18:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 1,000 ms
コード長 310 bytes
コンパイル時間 2,672 ms
コンパイル使用メモリ 70,872 KB
実行使用メモリ 56,516 KB
最終ジャッジ日時 2023-09-16 20:05:56
合計ジャッジ時間 5,721 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,920 KB
testcase_01 AC 115 ms
55,892 KB
testcase_02 AC 117 ms
55,928 KB
testcase_03 AC 114 ms
56,164 KB
testcase_04 AC 118 ms
56,160 KB
testcase_05 AC 116 ms
56,144 KB
testcase_06 AC 116 ms
55,948 KB
testcase_07 AC 118 ms
55,384 KB
testcase_08 AC 115 ms
56,036 KB
testcase_09 AC 119 ms
55,492 KB
testcase_10 AC 117 ms
56,176 KB
testcase_11 AC 118 ms
55,680 KB
testcase_12 AC 118 ms
55,840 KB
testcase_13 AC 117 ms
55,928 KB
testcase_14 AC 116 ms
56,516 KB
testcase_15 AC 120 ms
55,724 KB
testcase_16 AC 116 ms
55,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = n - 7;
        if (x < 8) {
            System.out.println(-1);
        } else {
            System.out.println(x);
        }
    }
}
0