結果

問題 No.83 最大マッチング
ユーザー 👑 箱
提出日時 2021-01-01 22:23:44
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 291 ms / 5,000 ms
コード長 681 bytes
コンパイル時間 10,661 ms
コンパイル使用メモリ 427,636 KB
実行使用メモリ 51,624 KB
最終ジャッジ日時 2024-04-19 20:05:26
合計ジャッジ時間 15,257 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 270 ms
50,956 KB
testcase_01 AC 259 ms
51,256 KB
testcase_02 AC 264 ms
51,188 KB
testcase_03 AC 267 ms
51,112 KB
testcase_04 AC 266 ms
51,232 KB
testcase_05 AC 256 ms
51,224 KB
testcase_06 AC 274 ms
51,256 KB
testcase_07 AC 262 ms
50,952 KB
testcase_08 AC 291 ms
51,228 KB
testcase_09 AC 286 ms
51,164 KB
testcase_10 AC 267 ms
51,080 KB
testcase_11 AC 274 ms
51,624 KB
testcase_12 AC 266 ms
51,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter
import java.util.*
import kotlin.math.*

fun PrintWriter.solve() {
    val n = nextInt()
    val s = "1".repeat((n - 2) / 2)
    val p = if (n % 2 == 0) "1" else "7"
    println(p + s)
}

fun main() {
    val writer = PrintWriter(System.out, false)
    writer.solve()
    writer.flush()
}

// region Scanner
private var st = StringTokenizer("")
private val br = System.`in`.bufferedReader()

fun next(): String {
    while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())
    return st.nextToken()
}

fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextLine() = br.readLine()
fun nextDouble() = next().toDouble()
// endregion
0