結果

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

テストケース

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

ソースコード

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**5+10001):
  if check_num(i):a.append(i)
print(a[N-1])
0