結果

問題 No.306 さいたま2008
ユーザー javyjavy
提出日時 2015-11-27 22:45:06
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 300 ms / 2,000 ms
コード長 530 bytes
コンパイル時間 13,433 ms
コンパイル使用メモリ 414,980 KB
実行使用メモリ 53,204 KB
最終ジャッジ日時 2023-08-12 15:21:13
合計ジャッジ時間 21,649 ms
ジャッジサーバーID
(参考情報)
judge10 / judge9
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 293 ms
52,668 KB
testcase_01 AC 292 ms
53,060 KB
testcase_02 AC 293 ms
52,960 KB
testcase_03 AC 292 ms
52,732 KB
testcase_04 AC 290 ms
52,772 KB
testcase_05 AC 289 ms
52,744 KB
testcase_06 AC 292 ms
52,796 KB
testcase_07 AC 293 ms
52,628 KB
testcase_08 AC 300 ms
52,592 KB
testcase_09 AC 297 ms
52,652 KB
testcase_10 AC 291 ms
52,732 KB
testcase_11 AC 288 ms
52,764 KB
testcase_12 AC 291 ms
52,740 KB
testcase_13 AC 288 ms
52,756 KB
testcase_14 AC 288 ms
52,620 KB
testcase_15 AC 286 ms
53,028 KB
testcase_16 AC 290 ms
52,648 KB
testcase_17 AC 286 ms
52,832 KB
testcase_18 AC 287 ms
52,860 KB
testcase_19 AC 291 ms
52,744 KB
testcase_20 AC 294 ms
53,204 KB
testcase_21 AC 290 ms
52,640 KB
testcase_22 AC 292 ms
52,600 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package Yukicoder

/**
 * Created by hichikawa on 2015/11/12.
 */
fun main(args: Array<String>) {
    fun readLineIntArray() : List<Int> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toInt() }
        return ret
    }
    val pointX = readLineIntArray()
    val pointY = readLineIntArray()
//    println(pointX[0] + (pointY[1] - pointX[1])*pointX[1]/pointY[1].toDouble())
    println(pointX[1] + (pointY[1] - pointX[1])*pointX[0]/(pointX[0]+pointY[0]).toDouble())
}
0