結果

問題 No.395 永遠の17歳
ユーザー rocoderrocoder
提出日時 2017-06-10 16:06:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 11,792 KB
実行使用メモリ 10,236 KB
最終ジャッジ日時 2023-10-24 20:30:17
合計ジャッジ時間 1,292 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,224 KB
testcase_01 AC 25 ms
10,224 KB
testcase_02 AC 26 ms
10,224 KB
testcase_03 AC 29 ms
10,224 KB
testcase_04 WA -
testcase_05 AC 32 ms
10,224 KB
testcase_06 AC 28 ms
10,224 KB
testcase_07 AC 26 ms
10,224 KB
testcase_08 AC 26 ms
10,224 KB
testcase_09 AC 26 ms
10,224 KB
testcase_10 AC 25 ms
10,224 KB
testcase_11 WA -
testcase_12 AC 25 ms
10,224 KB
testcase_13 AC 25 ms
10,224 KB
testcase_14 AC 25 ms
10,224 KB
testcase_15 AC 25 ms
10,224 KB
testcase_16 AC 25 ms
10,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#395 17 forever
import math
N=int(input())
if N<15:
    print(-1)
else:
    i=8
    nd=0
    while nd==0 and i<=math.sqrt(N):
        if N%i==0:
            nd=i
        i+=1 
    if nd>0:
        print(nd)
    else:
        print(N-7)
0