結果

問題 No.1658 Product / Sum
ユーザー 👑 箱星箱星
提出日時 2021-07-18 06:11:00
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 402 ms / 2,000 ms
コード長 689 bytes
コンパイル時間 11,837 ms
コンパイル使用メモリ 434,844 KB
実行使用メモリ 60,312 KB
最終ジャッジ日時 2024-05-01 00:55:30
合計ジャッジ時間 18,768 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 315 ms
58,024 KB
testcase_01 AC 311 ms
58,172 KB
testcase_02 AC 314 ms
58,220 KB
testcase_03 AC 306 ms
58,108 KB
testcase_04 AC 309 ms
58,100 KB
testcase_05 AC 400 ms
60,288 KB
testcase_06 AC 402 ms
60,168 KB
testcase_07 AC 356 ms
60,212 KB
testcase_08 AC 399 ms
60,064 KB
testcase_09 AC 361 ms
60,312 KB
testcase_10 AC 362 ms
60,100 KB
testcase_11 AC 360 ms
60,044 KB
testcase_12 AC 357 ms
60,156 KB
testcase_13 AC 358 ms
60,280 KB
testcase_14 AC 399 ms
60,152 KB
testcase_15 AC 357 ms
60,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter
import java.util.*

fun PrintWriter.solve() {
    val n = nextInt()
    val k = nextInt()
    val a = Array(n) { 1 }
    a[0] = 2 * k
    a[1] = 2 * k + n - 2
    println(a.joinToString(" "))
}

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