結果

問題 No.3093 Please GCD
ユーザー MasKoaTSMasKoaTS
提出日時 2022-04-01 22:04:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,068 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 106,528 KB
平均クエリ数 505.00
最終ジャッジ日時 2024-04-30 14:07:23
合計ジャッジ時間 9,400 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
103,272 KB
testcase_01 AC 151 ms
102,880 KB
testcase_02 AC 157 ms
103,536 KB
testcase_03 WA -
testcase_04 AC 246 ms
106,328 KB
testcase_05 WA -
testcase_06 AC 209 ms
106,488 KB
testcase_07 AC 201 ms
105,952 KB
testcase_08 AC 283 ms
106,528 KB
testcase_09 AC 206 ms
106,364 KB
testcase_10 AC 149 ms
102,988 KB
testcase_11 AC 175 ms
105,644 KB
testcase_12 AC 197 ms
106,020 KB
testcase_13 AC 198 ms
105,904 KB
testcase_14 AC 208 ms
106,480 KB
testcase_15 AC 153 ms
103,744 KB
testcase_16 AC 199 ms
105,908 KB
testcase_17 AC 199 ms
106,420 KB
testcase_18 AC 203 ms
106,420 KB
testcase_19 WA -
testcase_20 AC 215 ms
106,068 KB
testcase_21 AC 207 ms
106,040 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 206 ms
105,956 KB
testcase_25 AC 240 ms
105,828 KB
testcase_26 AC 210 ms
106,396 KB
testcase_27 WA -
testcase_28 AC 206 ms
106,176 KB
testcase_29 AC 202 ms
105,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools as iter
import collections as coll
import heapq as hq
import bisect as bis
from decimal import Decimal as dec
from functools import cmp_to_key
import math
import sys
#import pypyjit
#pypyjit.set_param('max_unroll_recursion=-1')
sys.setrecursionlimit(10 ** 6)
inp = sys.stdin.readline
input = lambda : inp().rstrip()
getN = lambda : int(inp())
getNs = lambda : map(int, inp().split())
getList = lambda :list(map(int, inp().split()))
getStrs = lambda n : [input() for _ in [0] * n]
def yexit(): print("Yes"); exit(0)
def nexit(): print("No"); exit(0)
pi = 3.141592653589793
mod = 1000000007
MOD = 998244353
INF = 4611686018427387903
dx = [1, 0, -1, 0];	dy = [0, 1, 0, -1]


"""
Main Code
"""

n = getN()
lis = [True] * (n + 1)
prime = []
for i in range(2, n + 1):
	if not(lis[i]):
		continue
	prime.append(i)
	for j in range(i * 2, n + 1, i):
		lis[j] = False

cnt = 0
x = 1
for i in prime:
	if(cnt == 600):
		break
	y = 1
	while(y * i <= n):
		y *= i
	print("? " + str(y), flush = True)
	s = getN()
	x *= s
	cnt += 1
print("! " + str(x), flush = True)
0