結果

問題 No.1175 Simultaneous Equations
ユーザー rutilicusrutilicus
提出日時 2021-02-21 23:10:12
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 317 ms / 2,000 ms
コード長 463 bytes
コンパイル時間 14,519 ms
コンパイル使用メモリ 434,848 KB
実行使用メモリ 54,568 KB
最終ジャッジ日時 2023-10-20 00:02:06
合計ジャッジ時間 20,082 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 314 ms
54,556 KB
testcase_01 AC 314 ms
54,564 KB
testcase_02 AC 317 ms
54,560 KB
testcase_03 AC 313 ms
54,564 KB
testcase_04 AC 317 ms
54,556 KB
testcase_05 AC 313 ms
54,556 KB
testcase_06 AC 311 ms
54,556 KB
testcase_07 AC 314 ms
54,564 KB
testcase_08 AC 309 ms
54,548 KB
testcase_09 AC 316 ms
54,552 KB
testcase_10 AC 315 ms
54,560 KB
testcase_11 AC 306 ms
54,564 KB
testcase_12 AC 311 ms
54,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val input = readInputLine().split(" ").map { it.toDouble() }
    val a = input[0]
    val b = input[1]
    val c = input[2]
    val d = input[3]
    val e = input[4]
    val f = input[5]

    val x = (c - (b / e) * f) / (a - (b / e) * d)
    val y = (c - (a / d) * f) / (b - (a / d) * e)

    builder.appendLine("$x $y")

    print(builder.toString())
}

fun readInputLine(): String {
    return readLine()!!
}
0