結果

問題 No.32 貯金箱の憂鬱
ユーザー javyjavy
提出日時 2015-11-02 22:00:37
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 276 ms / 5,000 ms
コード長 492 bytes
コンパイル時間 14,445 ms
コンパイル使用メモリ 409,384 KB
実行使用メモリ 50,392 KB
最終ジャッジ日時 2023-09-30 07:58:50
合計ジャッジ時間 19,357 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 271 ms
50,172 KB
testcase_01 AC 265 ms
50,156 KB
testcase_02 AC 268 ms
50,256 KB
testcase_03 AC 276 ms
50,116 KB
testcase_04 AC 267 ms
50,120 KB
testcase_05 AC 265 ms
50,196 KB
testcase_06 AC 265 ms
50,188 KB
testcase_07 AC 265 ms
50,264 KB
testcase_08 AC 264 ms
50,232 KB
testcase_09 AC 268 ms
50,320 KB
testcase_10 AC 265 ms
50,392 KB
testcase_11 AC 267 ms
50,244 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

/**
 * Created by hichikawa on 2015/11/01.
 */

fun main(args: Array<String>) {

    fun readLineInt() : Int{
        val s = readLine() as String
        return s.toInt()
    }

    val sum = readLineInt() * 100 + readLineInt() * 25 + readLineInt() * 1
    var count = 0
    val sumUnder1000 = sum % 1000
    count += sumUnder1000 / 100
    val sumUnder100 = sumUnder1000 % 100
    count += sumUnder100 / 25
    val sumUnder25 = sumUnder100 % 25
    count += sumUnder25
    println(count)
}
0