結果

問題 No.51 やる気の問題
ユーザー karayuukarayuu
提出日時 2018-11-23 13:05:01
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 12,028 ms
コンパイル使用メモリ 416,228 KB
実行使用メモリ 52,580 KB
最終ジャッジ日時 2023-08-13 01:00:19
合計ジャッジ時間 19,106 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 268 ms
50,192 KB
testcase_01 AC 267 ms
50,036 KB
testcase_02 AC 268 ms
50,356 KB
testcase_03 AC 267 ms
50,028 KB
testcase_04 AC 268 ms
50,068 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 273 ms
50,312 KB
testcase_08 AC 272 ms
50,236 KB
testcase_09 WA -
testcase_10 AC 272 ms
50,228 KB
testcase_11 AC 270 ms
50,304 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 291 ms
50,496 KB
testcase_15 WA -
testcase_16 AC 271 ms
50,268 KB
testcase_17 AC 268 ms
50,272 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 271 ms
50,360 KB
testcase_22 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:4:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

/**
 * Created by karayuu on 2018/11/23
 */
fun main(args: Array<String>) {
    var w = readLine()!!.toDouble()
    var d = readLine()!!.toInt()
    var motivation: Double = 0.0

    while (d >= 1) {
        motivation = w / (d * d)
        w -= Math.floor(motivation)
        d--
    }

    println(Math.floor(motivation).toInt())
}
0