結果

問題 No.128 お年玉(1)
ユーザー yo-kondoyo-kondo
提出日時 2018-03-25 21:16:29
言語 Kotlin
(1.9.23)
結果
RE  
実行時間 -
コード長 501 bytes
コンパイル時間 13,582 ms
コンパイル使用メモリ 429,016 KB
実行使用メモリ 51,936 KB
最終ジャッジ日時 2024-04-08 19:29:33
合計ジャッジ時間 19,946 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 293 ms
51,768 KB
testcase_01 AC 299 ms
51,768 KB
testcase_02 AC 291 ms
51,868 KB
testcase_03 RE -
testcase_04 AC 275 ms
51,780 KB
testcase_05 AC 277 ms
51,780 KB
testcase_06 AC 278 ms
51,784 KB
testcase_07 AC 278 ms
51,788 KB
testcase_08 AC 282 ms
51,788 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package yukicoder.no128

/**
 * エントリポイント
 */
fun main(args: Array<String>) {
    val in1 = readLine()
    val in2 = readLine()
    print(otoshidama(in1, in2))
}

/**
 * お年玉を均等に渡せる金額を返します。
 * @param budget 予算
 * @param num お年玉を渡す人数
 */
fun otoshidama(budget: String?, num: String?): String {
    if (budget == null || num == null) {
        return ""
    }
    return ((budget.toInt() / (num.toInt() * 1000)) * 1000).toString()
}
0