結果
| 問題 |
No.16 累乗の加算
|
| コンテスト | |
| ユーザー |
mmmppp
|
| 提出日時 | 2017-02-28 00:51:42 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 119 bytes |
| コンパイル時間 | 45 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,544 KB |
| 最終ジャッジ日時 | 2024-06-11 20:20:43 |
| 合計ジャッジ時間 | 1,985 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 14 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - x 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=->z,n{n<1?1:(_=w[z*z,n/2]%d;n&1<1)?_:_*z}
s=0;a.map{|e|s+=w[e]};p s%d
mmmppp