結果

問題 No.395 永遠の17歳
ユーザー matsuyoshi30matsuyoshi30
提出日時 2017-01-11 23:41:50
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 422 bytes
コンパイル時間 3,669 ms
コンパイル使用メモリ 74,516 KB
実行使用メモリ 56,184 KB
最終ジャッジ日時 2023-08-23 08:32:53
合計ジャッジ時間 7,115 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,168 KB
testcase_01 AC 119 ms
55,672 KB
testcase_02 AC 120 ms
55,752 KB
testcase_03 AC 119 ms
55,880 KB
testcase_04 AC 119 ms
55,804 KB
testcase_05 AC 120 ms
55,896 KB
testcase_06 WA -
testcase_07 AC 119 ms
56,184 KB
testcase_08 AC 121 ms
55,856 KB
testcase_09 WA -
testcase_10 AC 121 ms
55,608 KB
testcase_11 AC 120 ms
55,560 KB
testcase_12 AC 119 ms
56,044 KB
testcase_13 AC 119 ms
55,772 KB
testcase_14 AC 119 ms
55,808 KB
testcase_15 AC 118 ms
55,660 KB
testcase_16 AC 119 ms
56,100 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 = 0;

        if(a < 8) {
            ans = -1;
        } else {
            ans = a - 7;
        }

        System.out.println(ans);

        in.close();
    }
}
0