結果

問題 No.97 最大の値を求めるくえり
ユーザー mmmpppmmmppp
提出日時 2017-02-28 20:13:40
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 198 bytes
コンパイル時間 504 ms
コンパイル使用メモリ 11,460 KB
実行使用メモリ 118,076 KB
最終ジャッジ日時 2023-09-02 18:00:17
合計ジャッジ時間 8,219 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a=[123456789,362436069,521288629,88675123]
A=->{t=a[0]^a[0]<<11
a.shift
a+=[w=a[-1]^(a[-1]>>19)^t^t>>8]
w}
d=100003
n,_,*q=$<.read.split.map &:to_i
r=n.times.map{A[]%d}
p n.times{|i|r[i]*q[i]%d}.max
0