結果

問題 No.51 やる気の問題
ユーザー javyjavy
提出日時 2015-11-27 22:19:08
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 304 ms / 5,000 ms
コード長 389 bytes
コンパイル時間 12,896 ms
コンパイル使用メモリ 427,444 KB
実行使用メモリ 54,384 KB
最終ジャッジ日時 2024-04-30 08:51:15
合計ジャッジ時間 21,090 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 294 ms
54,132 KB
testcase_01 AC 293 ms
54,116 KB
testcase_02 AC 302 ms
54,112 KB
testcase_03 AC 297 ms
54,300 KB
testcase_04 AC 297 ms
54,244 KB
testcase_05 AC 304 ms
54,100 KB
testcase_06 AC 300 ms
54,340 KB
testcase_07 AC 297 ms
54,240 KB
testcase_08 AC 300 ms
54,220 KB
testcase_09 AC 300 ms
54,056 KB
testcase_10 AC 294 ms
54,220 KB
testcase_11 AC 294 ms
54,120 KB
testcase_12 AC 291 ms
54,096 KB
testcase_13 AC 295 ms
54,232 KB
testcase_14 AC 294 ms
54,384 KB
testcase_15 AC 298 ms
54,248 KB
testcase_16 AC 294 ms
54,112 KB
testcase_17 AC 296 ms
54,148 KB
testcase_18 AC 296 ms
54,268 KB
testcase_19 AC 296 ms
54,268 KB
testcase_20 AC 297 ms
54,120 KB
testcase_21 AC 300 ms
54,224 KB
testcase_22 AC 294 ms
54,264 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package Yukicoder

/**
 * Created by hichikawa on 2015/11/12.
 */
fun main(args: Array<String>) {
    fun readLineInt(): Int {
        val str = readLine() as String
        return str.toInt()
    }
    var numMax = readLineInt()
    val num = readLineInt()

    for (i in num downTo 2) {
        numMax -= (numMax / Math.pow(i.toDouble(),2.toDouble())).toInt()
    }
    println(numMax)
}
0