結果
| 問題 | 
                            No.16 累乗の加算
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mmmppp
                         | 
                    
| 提出日時 | 2017-02-28 00:51:10 | 
| 言語 | Ruby  (3.4.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 117 bytes | 
| コンパイル時間 | 93 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 12,416 KB | 
| 最終ジャッジ日時 | 2024-06-11 20:20:40 | 
| 合計ジャッジ時間 | 2,349 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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