結果

問題 No.3093 Please GCD
ユーザー tassei903tassei903
提出日時 2022-04-01 21:41:45
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 1,349 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 87,984 KB
平均クエリ数 505.20
最終ジャッジ日時 2024-04-30 13:30:46
合計ジャッジ時間 8,280 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 RE -
testcase_11 RE -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 RE -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

def divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


def is_prime(n):
    if n==1:
        return False
    if len(divisors(n))==1:
        return True
    else:
        return False


p = []
pmax = 10**4
a = [-1]*(pmax+1)
for i in range(2,pmax+1):
    if a[i]==-1:
        p.append(i)
        for j in range(i,pmax+1,i):
            a[j] = i
plen = len(p)

def f(x):
    for i in p:
        if x==i:
            return 1
        if x%i==0:
            return 0
    return 1

def fastfact(x):
    r = []
    while x > 1:
        p = a[x]
        c = 0
        while a[x]==p:
            x//=p
            c += 1
        r.append((p, c))
    return r
ans = 1
m = 600
for i in range(m):
    print("?",p[i],flush=True)
    s = ni()
    ans *= s
print("!", ans)
0