結果

問題 No.16 累乗の加算
ユーザー quilt-tailsquilt-tails
提出日時 2016-11-12 01:12:07
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 121 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 68,144 KB
最終ジャッジ日時 2024-05-04 04:02:13
合計ジャッジ時間 25,585 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
12,160 KB
testcase_01 AC 89 ms
12,032 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x, n = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
sum = 0
n.times do |i|
  sum += x ** a[i]
end
puts sum % 1000003
0