提出 #22269560


ソースコード 拡げる

import numpy as np

N = int(input())
MAX = 10000

in_A = np.zeros(MAX + 1, np.bool_)
for d in [6, 10, 15]:
  in_A[d::d] = 1

A = np.where(in_A)[0]
A[2], A[3] = A[3], A[2]  # avoid gcd(A) > 1
print(*A[:N])

提出情報

提出日時
問題 C - Coprime Set
ユーザ maspy
言語 Python (3.8.2)
得点 500
コード長 215 Byte
結果 AC
実行時間 114 ms
メモリ 27040 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 500 / 500
結果
AC × 1
AC × 18
セット名 テストケース
Sample 01_sample_01.txt
All 01_sample_01.txt, 02_small_01.txt, 02_small_02.txt, 02_small_03.txt, 02_small_04.txt, 02_small_05.txt, 02_small_06.txt, 03_rand_01.txt, 03_rand_02.txt, 03_rand_03.txt, 03_rand_04.txt, 03_rand_05.txt, 04_max_01.txt, 05_corner_01.txt, 05_corner_02.txt, 05_corner_03.txt, 05_corner_04.txt, 05_corner_05.txt
ケース名 結果 実行時間 メモリ
01_sample_01.txt AC 110 ms 26788 KiB
02_small_01.txt AC 109 ms 27012 KiB
02_small_02.txt AC 107 ms 26988 KiB
02_small_03.txt AC 109 ms 26836 KiB
02_small_04.txt AC 110 ms 26644 KiB
02_small_05.txt AC 108 ms 26788 KiB
02_small_06.txt AC 114 ms 26820 KiB
03_rand_01.txt AC 108 ms 27008 KiB
03_rand_02.txt AC 113 ms 27040 KiB
03_rand_03.txt AC 109 ms 26524 KiB
03_rand_04.txt AC 111 ms 26756 KiB
03_rand_05.txt AC 112 ms 26620 KiB
04_max_01.txt AC 112 ms 26908 KiB
05_corner_01.txt AC 108 ms 26784 KiB
05_corner_02.txt AC 110 ms 26740 KiB
05_corner_03.txt AC 110 ms 26796 KiB
05_corner_04.txt AC 109 ms 27016 KiB
05_corner_05.txt AC 111 ms 26780 KiB