結果

問題 No.83 最大マッチング
ユーザー バカらっくバカらっく
提出日時 2019-09-26 07:46:50
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 294 ms / 5,000 ms
コード長 334 bytes
コンパイル時間 11,669 ms
コンパイル使用メモリ 434,724 KB
実行使用メモリ 51,720 KB
最終ジャッジ日時 2023-10-24 15:10:21
合計ジャッジ時間 16,679 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 265 ms
51,624 KB
testcase_01 AC 267 ms
51,636 KB
testcase_02 AC 275 ms
51,620 KB
testcase_03 AC 268 ms
51,644 KB
testcase_04 AC 262 ms
51,620 KB
testcase_05 AC 264 ms
51,628 KB
testcase_06 AC 263 ms
51,624 KB
testcase_07 AC 263 ms
51,620 KB
testcase_08 AC 267 ms
51,624 KB
testcase_09 AC 277 ms
51,700 KB
testcase_10 AC 279 ms
51,696 KB
testcase_11 AC 294 ms
51,720 KB
testcase_12 AC 285 ms
51,708 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

import java.lang.StringBuilder

fun main(args:Array<String>) {
    var n = readLine()!!.toInt()
    val ans = StringBuilder()
    if(n % 2 == 1) {
        ans.append(7)
        n -= 3
    } else {
        ans.append(1)
        n -= 2
    }

    for(i in (0 until  (n/2))) {
        ans.append(1)
    }
    println(ans.toString())

}

0