結果

問題 No.16 累乗の加算
ユーザー DialBird
提出日時 2016-11-17 12:39:11
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 163 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 83,008 KB
最終ジャッジ日時 2024-11-26 02:48:55
合計ジャッジ時間 3,106 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - x
Main.rb:2: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

def main
  x, n = gets.split.map(&:to_i)
  a_list = gets.split.map(&:to_i)
  total = 0
  a_list.each do |i|
    total += 2 ** i
  end
  total % 1000003
end

p main
0