結果

問題 No.395 永遠の17歳
ユーザー matsuyoshi30matsuyoshi30
提出日時 2017-01-11 23:51:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 1,000 ms
コード長 385 bytes
コンパイル時間 2,613 ms
コンパイル使用メモリ 75,296 KB
実行使用メモリ 54,492 KB
最終ジャッジ日時 2024-04-15 09:34:41
合計ジャッジ時間 5,393 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
54,108 KB
testcase_01 AC 139 ms
54,016 KB
testcase_02 AC 139 ms
53,832 KB
testcase_03 AC 139 ms
54,248 KB
testcase_04 AC 138 ms
54,072 KB
testcase_05 AC 143 ms
54,464 KB
testcase_06 AC 140 ms
54,088 KB
testcase_07 AC 141 ms
54,188 KB
testcase_08 AC 144 ms
53,856 KB
testcase_09 AC 138 ms
54,280 KB
testcase_10 AC 140 ms
54,084 KB
testcase_11 AC 138 ms
54,236 KB
testcase_12 AC 142 ms
53,828 KB
testcase_13 AC 141 ms
54,348 KB
testcase_14 AC 138 ms
54,004 KB
testcase_15 AC 143 ms
54,308 KB
testcase_16 AC 146 ms
54,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();

        int ans = -1;

        if(a > 14) {
            ans = a - 7;
        }

        System.out.println(ans);

        in.close();
    }
}
0