結果

問題 No.395 永遠の17歳
ユーザー Mcpu3Mcpu3
提出日時 2018-09-01 10:27:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 279 bytes
コンパイル時間 1,916 ms
コンパイル使用メモリ 71,196 KB
実行使用メモリ 56,384 KB
最終ジャッジ日時 2023-10-13 10:51:52
合計ジャッジ時間 5,100 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,384 KB
testcase_01 AC 122 ms
55,760 KB
testcase_02 AC 119 ms
55,528 KB
testcase_03 AC 119 ms
55,584 KB
testcase_04 AC 123 ms
55,672 KB
testcase_05 AC 119 ms
56,096 KB
testcase_06 AC 119 ms
56,080 KB
testcase_07 AC 118 ms
55,840 KB
testcase_08 AC 121 ms
55,820 KB
testcase_09 AC 123 ms
55,676 KB
testcase_10 AC 122 ms
55,844 KB
testcase_11 AC 124 ms
56,008 KB
testcase_12 AC 122 ms
55,880 KB
testcase_13 AC 121 ms
55,844 KB
testcase_14 AC 123 ms
56,020 KB
testcase_15 AC 123 ms
56,240 KB
testcase_16 AC 121 ms
56,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt(),i;
		sc.close();
		for(i=2;101>i;i++) if(a/i==1&&a%i==7) break;
		if(i>99) System.out.print(-1);
		else System.out.print(i);
	}
}
0