結果

問題 No.56 消費税
ユーザー rutilicus
提出日時 2020-08-30 21:29:13
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 329 ms / 5,000 ms
コード長 242 bytes
コンパイル時間 13,403 ms
コンパイル使用メモリ 424,748 KB
実行使用メモリ 57,032 KB
最終ジャッジ日時 2024-11-15 15:30:16
合計ジャッジ時間 21,862 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:13: warning: 'appendln(Int): kotlin.text.StringBuilder /* = java.lang.StringBuilder */' is deprecated. Use appendLine instead. Note that the new method always appends the line feed character '\n' regardless of the system line separator.
    builder.appendln(d + (d * p / 100))
            ^

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val (d, p) = readInputLine().split(" ").map { it.toInt() }

    builder.appendln(d + (d * p / 100))

    print(builder.toString())
}

fun readInputLine(): String {
    return readLine()!!
}
0