Submission #17960802


Source Code Expand

Copy
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def from_read(dtype=np.int64):
    return np.fromstring(read().decode(), dtype=dtype, sep=' ')


def from_readline(dtype=np.int64):
    return np.fromstring(readline().decode(), dtype=dtype, sep=' ')

def main(A):
    best_val = -1
    ans = -1
    for x in range(2, 1001):
        cnt = np.sum(A % x == 0)
        if best_val < cnt:
            best_val = cnt
            ans = x
    return ans

A = from_read()

print(main(A))

Submission Info

Submission Time
Task B - Almost GCD
User maspy
Language Python (3.8.2)
Score 200
Code Size 591 Byte
Status AC
Exec Time 119 ms
Memory 27296 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 19
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All answer_based_00.txt, answer_based_01.txt, answer_based_02.txt, answer_based_03.txt, answer_based_04.txt, handmade_00.txt, handmade_01.txt, handmade_02.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, same_00.txt, same_01.txt, same_02.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
answer_based_00.txt AC 119 ms 27048 KB
answer_based_01.txt AC 112 ms 26736 KB
answer_based_02.txt AC 113 ms 27296 KB
answer_based_03.txt AC 112 ms 27060 KB
answer_based_04.txt AC 112 ms 27044 KB
handmade_00.txt AC 112 ms 27012 KB
handmade_01.txt AC 109 ms 27056 KB
handmade_02.txt AC 110 ms 27016 KB
random_00.txt AC 111 ms 27060 KB
random_01.txt AC 113 ms 27248 KB
random_02.txt AC 112 ms 27016 KB
random_03.txt AC 112 ms 27044 KB
random_04.txt AC 111 ms 26972 KB
same_00.txt AC 109 ms 26768 KB
same_01.txt AC 112 ms 27036 KB
same_02.txt AC 111 ms 27024 KB
sample_01.txt AC 112 ms 26992 KB
sample_02.txt AC 109 ms 26816 KB
sample_03.txt AC 111 ms 27128 KB