結果

問題 No.1658 Product / Sum
ユーザー 👑 箱
提出日時 2021-07-18 06:11:00
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 380 ms / 2,000 ms
コード長 689 bytes
コンパイル時間 13,362 ms
コンパイル使用メモリ 415,408 KB
実行使用メモリ 57,372 KB
最終ジャッジ日時 2023-08-13 07:07:38
合計ジャッジ時間 21,934 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 293 ms
56,252 KB
testcase_01 AC 291 ms
56,292 KB
testcase_02 AC 293 ms
56,040 KB
testcase_03 AC 293 ms
56,068 KB
testcase_04 AC 290 ms
56,060 KB
testcase_05 AC 373 ms
56,808 KB
testcase_06 AC 379 ms
57,372 KB
testcase_07 AC 334 ms
56,832 KB
testcase_08 AC 379 ms
57,044 KB
testcase_09 AC 347 ms
56,720 KB
testcase_10 AC 340 ms
56,756 KB
testcase_11 AC 336 ms
56,780 KB
testcase_12 AC 343 ms
56,696 KB
testcase_13 AC 361 ms
56,740 KB
testcase_14 AC 380 ms
56,940 KB
testcase_15 AC 347 ms
56,988 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