結果

問題 No.84 悪の算盤
ユーザー バカらっくバカらっく
提出日時 2019-09-26 08:01:42
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 306 ms / 5,000 ms
コード長 232 bytes
コンパイル時間 11,838 ms
コンパイル使用メモリ 440,992 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2023-10-24 15:13:14
合計ジャッジ時間 16,852 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 302 ms
54,404 KB
testcase_01 AC 306 ms
54,416 KB
testcase_02 AC 303 ms
54,408 KB
testcase_03 AC 303 ms
54,412 KB
testcase_04 AC 305 ms
54,408 KB
testcase_05 AC 305 ms
54,408 KB
testcase_06 AC 304 ms
54,404 KB
testcase_07 AC 302 ms
54,416 KB
testcase_08 AC 302 ms
54,404 KB
testcase_09 AC 304 ms
54,404 KB
testcase_10 AC 303 ms
54,412 KB
testcase_11 AC 301 ms
54,392 KB
testcase_12 AC 306 ms
54,408 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:2:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
    val (r,c) = readLine()!!.split(" ").map { it.toLong() }
    var ans = r * c
    if(r == c) {
        ans -= (ans * 3 / 4)
    } else {
        ans -= (ans / 2)
    }
    ans--
    println(ans)
}

0