結果
問題 |
No.3115 One Power One Kill
|
ユーザー |
|
提出日時 | 2025-04-19 07:27:23 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 684 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 82,244 KB |
実行使用メモリ | 71,128 KB |
平均クエリ数 | 2.00 |
最終ジャッジ日時 | 2025-04-19 07:27:28 |
合計ジャッジ時間 | 5,280 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 20 |
ソースコード
# written by ChatGPT o4-mini-high (really sorry) import sys def main(): # Pre‐chosen magic constants: A = 5760 B = 30030 # 1) send A, B print(A, B, flush=True) # 2) read K = gcd(X, A^B mod 1e9+7) line = sys.stdin.readline().strip() if not line: return K = int(line) # 3) predict X' = X^A mod B: # we know X' = 1 if gcd(X,B)==1, else 0, # and gcd(X,B)==K since all prime factors of B divide Y. if K == 1: Xp = 1 else: Xp = 0 # 4) output our guess print(Xp, flush=True) # 5) read judge verdict (not really used) _ = sys.stdin.readline() if __name__ == "__main__": main()