結果

問題 No.395 永遠の17歳
ユーザー atkrymatkrym
提出日時 2016-10-19 10:56:05
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 386 bytes
コンパイル時間 2,909 ms
コンパイル使用メモリ 74,840 KB
実行使用メモリ 41,544 KB
最終ジャッジ日時 2024-05-02 04:32:08
合計ジャッジ時間 6,225 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
41,156 KB
testcase_01 AC 135 ms
41,316 KB
testcase_02 AC 141 ms
41,200 KB
testcase_03 AC 141 ms
41,132 KB
testcase_04 AC 141 ms
41,280 KB
testcase_05 AC 143 ms
41,544 KB
testcase_06 WA -
testcase_07 AC 148 ms
41,196 KB
testcase_08 AC 143 ms
41,376 KB
testcase_09 WA -
testcase_10 AC 139 ms
41,132 KB
testcase_11 AC 138 ms
41,196 KB
testcase_12 AC 139 ms
41,332 KB
testcase_13 AC 139 ms
41,172 KB
testcase_14 AC 142 ms
41,364 KB
testcase_15 AC 139 ms
41,188 KB
testcase_16 AC 138 ms
41,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int a = sc.nextInt();
        for (int i = 0;i <= 100; i++) {
            if (a - i == 7) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
}
0