結果

問題 No.80 四角形を描こう
ユーザー バカらっくバカらっく
提出日時 2019-09-26 00:27:32
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 320 ms / 5,000 ms
コード長 227 bytes
コンパイル時間 14,715 ms
コンパイル使用メモリ 447,388 KB
実行使用メモリ 54,168 KB
最終ジャッジ日時 2023-10-24 05:01:33
合計ジャッジ時間 17,271 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 314 ms
54,160 KB
testcase_01 AC 320 ms
54,156 KB
testcase_02 AC 309 ms
54,160 KB
testcase_03 AC 289 ms
51,696 KB
testcase_04 AC 303 ms
54,148 KB
testcase_05 AC 314 ms
54,152 KB
testcase_06 AC 281 ms
51,688 KB
testcase_07 AC 295 ms
51,696 KB
testcase_08 AC 313 ms
54,164 KB
testcase_09 AC 314 ms
54,168 KB
testcase_10 AC 314 ms
54,168 KB
testcase_11 AC 314 ms
54,164 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
    val remain = readLine()!!.toInt()
    if(remain < 4) {
        println("0")
        return
    }

    var ans = (1..(remain/2)).map { it * ((remain - it * 2) / 2) }.max()
    println(ans)

}

0