結果

問題 No.142 単なる配列の操作に関する実装問題
ユーザー maspymaspy
提出日時 2020-04-09 21:25:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 299 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 96,756 KB
最終ジャッジ日時 2023-10-11 22:17:19
合計ジャッジ時間 2,875 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

N, S, X, Y, Z = map(int, readline().split())
N = 2 * 10**6
A = [0] * N
A[0] = S&1
x = S
for i in range(1, N):
    x = (x * X + Y) % Z
    A[i] = x&1

A = int(''.join(map(str, A)), 2)
0