結果

問題 No.1058 素敵な数
ユーザー paruf4paruf4
提出日時 2020-05-22 22:31:55
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 372 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 77,516 KB
最終ジャッジ日時 2024-04-15 17:33:14
合計ジャッジ時間 22,934 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,983 ms
76,348 KB
testcase_01 TLE -
testcase_02 TLE -
testcase_03 TLE -
testcase_04 TLE -
testcase_05 TLE -
testcase_06 TLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def check_num(n):
  ok1=True
  ok2=False
  for i in range(1,int(n**0.5)+1):
    if n%i==0:
      if 2<=i<=100000:
        ok1=False
        break
  for i in range(2,int(n**0.5)+1):
    if n%i==0:
      ok2=True
      break
  return True if ok1==True and ok2==True else False

N=int(input())
a=[1]
for i in range(10**5,10**6+1):
  if check_num(i):a.append(i)
print(a[N-1])
0