結果
| 問題 | No.16 累乗の加算 |
| コンテスト | |
| ユーザー |
mmmppp
|
| 提出日時 | 2017-02-28 00:51:10 |
| 言語 | Ruby (4.0.2) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 117 bytes |
| 記録 | |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 9,088 KB |
| 実行使用メモリ | 22,528 KB |
| 最終ジャッジ日時 | 2026-03-05 02:11:05 |
| 合計ジャッジ時間 | 2,944 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 14 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - n Syntax OK
ソースコード
d=1000003
x,n,*a=$<.read.split.map{|e|e.to_i%d}
w=->n{n<1?1:(_=w[x*x,n/2]%d;n&1<1)?_:_*x}
s=0;a.map{|e|s+=w[e]};p s%d
mmmppp