Submission #25226698
Source Code Expand
N,M =map(int,input().split())
Z = list(map(int,input().split()))
import math
A=[]
for i in range(1,M+1):
ok = True
for x in range(N):
if math.gcd(Z[x],i)==1:
ok=ok
else:
ok=False
if ok:
A.append(i)
print(len(A))
for i in range(len(A)):
print(A[i])
Submission Info
| Submission Time | |
|---|---|
| Task | D - Coprime 2 |
| User | kondou_y |
| Language | Python (3.8.2) |
| Score | 0 |
| Code Size | 296 Byte |
| Status | TLE |
| Exec Time | 2206 ms |
| Memory | 20732 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 400 | ||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt |
| All | sample_01.txt, special_01.txt, special_02.txt, special_03.txt, special_04.txt, special_05.txt, special_06.txt, special_07.txt, special_08.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| sample_01.txt | AC | 18 ms | 9136 KiB |
| special_01.txt | TLE | 2206 ms | 20636 KiB |
| special_02.txt | TLE | 2206 ms | 20424 KiB |
| special_03.txt | TLE | 2206 ms | 20428 KiB |
| special_04.txt | TLE | 2206 ms | 20324 KiB |
| special_05.txt | TLE | 2206 ms | 20732 KiB |
| special_06.txt | TLE | 2206 ms | 20660 KiB |
| special_07.txt | TLE | 2206 ms | 20528 KiB |
| special_08.txt | AC | 64 ms | 20560 KiB |
| test_01.txt | AC | 19 ms | 9180 KiB |
| test_02.txt | TLE | 2206 ms | 13584 KiB |
| test_03.txt | TLE | 2206 ms | 13628 KiB |
| test_04.txt | TLE | 2206 ms | 12864 KiB |
| test_05.txt | TLE | 2206 ms | 19024 KiB |
| test_06.txt | TLE | 2206 ms | 11956 KiB |
| test_07.txt | TLE | 2206 ms | 17016 KiB |
| test_08.txt | TLE | 2206 ms | 10432 KiB |
| test_09.txt | TLE | 2206 ms | 20588 KiB |
| test_10.txt | TLE | 2206 ms | 20452 KiB |
| test_11.txt | TLE | 2206 ms | 20400 KiB |
| test_12.txt | TLE | 2206 ms | 20320 KiB |
| test_13.txt | TLE | 2206 ms | 20640 KiB |
| test_14.txt | TLE | 2206 ms | 20636 KiB |
| test_15.txt | AC | 121 ms | 12712 KiB |
| test_16.txt | AC | 100 ms | 10356 KiB |
| test_17.txt | AC | 271 ms | 9704 KiB |
| test_18.txt | AC | 358 ms | 9480 KiB |
| test_19.txt | AC | 1796 ms | 9400 KiB |
| test_20.txt | AC | 1946 ms | 9472 KiB |