結果

問題 No.1415 100の倍数かつ正整数(1)
ユーザー バカらっくバカらっく
提出日時 2022-02-03 13:10:24
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 291 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 12,079 ms
コンパイル使用メモリ 421,348 KB
実行使用メモリ 54,788 KB
最終ジャッジ日時 2023-09-02 03:14:04
合計ジャッジ時間 20,001 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 283 ms
53,128 KB
testcase_01 AC 274 ms
50,476 KB
testcase_02 AC 269 ms
50,244 KB
testcase_03 AC 270 ms
50,236 KB
testcase_04 AC 284 ms
52,916 KB
testcase_05 AC 286 ms
52,876 KB
testcase_06 AC 285 ms
52,936 KB
testcase_07 AC 286 ms
52,816 KB
testcase_08 AC 288 ms
54,788 KB
testcase_09 AC 268 ms
50,292 KB
testcase_10 AC 271 ms
50,208 KB
testcase_11 AC 285 ms
53,164 KB
testcase_12 AC 283 ms
52,748 KB
testcase_13 AC 272 ms
50,260 KB
testcase_14 AC 291 ms
53,076 KB
testcase_15 AC 273 ms
50,304 KB
testcase_16 AC 288 ms
52,792 KB
testcase_17 AC 275 ms
50,476 KB
testcase_18 AC 282 ms
52,796 KB
testcase_19 AC 286 ms
53,308 KB
testcase_20 AC 281 ms
52,868 KB
testcase_21 AC 283 ms
52,992 KB
testcase_22 AC 268 ms
50,348 KB
testcase_23 AC 287 ms
53,084 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun main(args: Array<String>) {
    val n = readLine()!!
    val ans = if(n == "0" || n[0] == '-') {
        "0"
    } else {
        n.dropLast(2).let { if(it.isEmpty()) "0" else it }
    }
    println(ans)
}
0