結果

問題 No.32 貯金箱の憂鬱
コンテスト
ユーザー javy
提出日時 2015-11-02 22:00:37
言語 Kotlin
(2.4.10 + ACL)
コンパイル:
kotlinc -cp /opt/aclib/ac_library.jar _filename_ -include-runtime -d main.jar
実行:
java -cp main.jar:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 173 ms / 5,000 ms
+ 360µs
コード長 492 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 10,565 ms
コンパイル使用メモリ 468,556 KB
実行使用メモリ 52,304 KB
最終ジャッジ日時 2026-08-23 17:03:12
合計ジャッジ時間 13,640 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

/**
 * 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