結果

問題 No.2057 Ising Model
ユーザー rhincodon66rhincodon66
提出日時 2022-08-26 21:39:28
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 12,308 ms
コンパイル使用メモリ 429,792 KB
実行使用メモリ 51,816 KB
最終ジャッジ日時 2024-04-21 23:39:29
合計ジャッジ時間 28,142 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 276 ms
51,384 KB
testcase_01 AC 271 ms
51,480 KB
testcase_02 AC 283 ms
51,628 KB
testcase_03 AC 273 ms
51,604 KB
testcase_04 AC 271 ms
51,760 KB
testcase_05 AC 271 ms
51,640 KB
testcase_06 AC 283 ms
51,508 KB
testcase_07 AC 282 ms
51,748 KB
testcase_08 AC 274 ms
51,652 KB
testcase_09 AC 272 ms
51,492 KB
testcase_10 AC 277 ms
51,632 KB
testcase_11 AC 273 ms
51,504 KB
testcase_12 WA -
testcase_13 AC 274 ms
51,516 KB
testcase_14 AC 280 ms
51,612 KB
testcase_15 AC 274 ms
51,700 KB
testcase_16 AC 276 ms
51,616 KB
testcase_17 AC 284 ms
51,620 KB
testcase_18 AC 275 ms
51,816 KB
testcase_19 AC 278 ms
51,536 KB
testcase_20 AC 283 ms
51,516 KB
testcase_21 AC 276 ms
51,752 KB
testcase_22 AC 278 ms
51,624 KB
testcase_23 WA -
testcase_24 AC 276 ms
51,616 KB
testcase_25 AC 284 ms
51,600 KB
testcase_26 AC 276 ms
51,544 KB
testcase_27 WA -
testcase_28 AC 278 ms
51,588 KB
testcase_29 AC 283 ms
51,384 KB
testcase_30 AC 276 ms
51,568 KB
testcase_31 AC 279 ms
51,480 KB
testcase_32 AC 276 ms
51,720 KB
testcase_33 AC 286 ms
51,504 KB
testcase_34 AC 322 ms
51,648 KB
testcase_35 AC 318 ms
51,612 KB
testcase_36 AC 325 ms
51,484 KB
testcase_37 AC 277 ms
51,624 KB
testcase_38 AC 277 ms
51,608 KB
testcase_39 AC 277 ms
51,616 KB
testcase_40 AC 280 ms
51,516 KB
testcase_41 AC 275 ms
51,532 KB
testcase_42 AC 275 ms
51,592 KB
testcase_43 AC 276 ms
51,620 KB
testcase_44 AC 278 ms
51,480 KB
testcase_45 WA -
testcase_46 AC 279 ms
51,524 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

import java.lang.StringBuilder
import java.util.*
import kotlin.collections.ArrayList
import kotlin.math.*

fun main(args:Array<String>) {
    /*
    val t = readLine()!!.toInt()
    repeat(t) {
        solve()
    }
    */
    solve()
}

fun solve() {
    val (n, a, b) = readLine()!!.split(" ").map{it.toLong()}.toLongArray()
    val ans = min((n - 1) * a - b * n, -(n - 1) * a - if (n % 2 == 0L) 0 else b)
    println(ans)
}
0