結果
問題 |
No.16 累乗の加算
|
ユーザー |
![]() |
提出日時 | 2017-04-08 17:52:07 |
言語 | Kotlin (2.1.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 11,921 ms |
コンパイル使用メモリ | 433,644 KB |
実行使用メモリ | 240,568 KB |
最終ジャッジ日時 | 2024-11-20 08:09:31 |
合計ジャッジ時間 | 80,031 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 TLE * 11 |
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^
ソースコード
import java.math.BigDecimal fun main(args: Array<String>) { val base = BigDecimal(readLine()!!.split(" ")[0]) val ans = readLine()!!.split(" ").map { x -> x.toInt() }.map { x -> val powed = base.pow(x) powed.rem(BigDecimal("1000003")) }.reduce { e, x -> e.add(x) } println(ans) }