結果

問題 No.477 MVP
ユーザー htkbhtkb
提出日時 2017-02-01 22:08:28
言語 Kotlin
(1.9.23)
結果
RE  
実行時間 -
コード長 295 bytes
コンパイル時間 11,463 ms
コンパイル使用メモリ 424,272 KB
実行使用メモリ 55,684 KB
最終ジャッジ日時 2024-04-30 12:24:56
合計ジャッジ時間 16,481 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 361 ms
55,440 KB
testcase_01 AC 357 ms
55,480 KB
testcase_02 AC 363 ms
55,384 KB
testcase_03 AC 364 ms
55,448 KB
testcase_04 AC 354 ms
55,448 KB
testcase_05 AC 358 ms
55,464 KB
testcase_06 AC 363 ms
55,516 KB
testcase_07 AC 359 ms
55,448 KB
testcase_08 AC 356 ms
55,568 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:4:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^
Main.kt:7:13: warning: 'divide(BigDecimal!, Int): BigDecimal!' is deprecated. Deprecated in Java
    hp = hp.divide(BigDecimal((sc.nextInt()+1).toString()), BigDecimal.ROUND_FLOOR).plus(BigDecimal("1"))
            ^
Main.kt:7:72: warning: 'ROUND_FLOOR: Int' is deprecated. Deprecated in Java
    hp = hp.divide(BigDecimal((sc.nextInt()+1).toString()), BigDecimal.ROUND_FLOOR).plus(BigDecimal("1"))
                                                                       ^

ソースコード

diff #

import java.math.BigDecimal
import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    var hp:BigDecimal = BigDecimal(sc.next());
    hp = hp.divide(BigDecimal((sc.nextInt()+1).toString()), BigDecimal.ROUND_FLOOR).plus(BigDecimal("1"))
    println(hp.toString())
}
0