結果

問題 No.159 刺さらないUSB
ユーザー javyjavy
提出日時 2015-11-12 12:00:44
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 302 ms / 1,000 ms
コード長 1,100 bytes
コンパイル時間 14,242 ms
コンパイル使用メモリ 415,992 KB
実行使用メモリ 54,704 KB
最終ジャッジ日時 2023-09-14 16:46:12
合計ジャッジ時間 21,600 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 302 ms
52,772 KB
testcase_01 AC 294 ms
52,832 KB
testcase_02 AC 294 ms
52,528 KB
testcase_03 AC 294 ms
52,676 KB
testcase_04 AC 295 ms
53,492 KB
testcase_05 AC 293 ms
52,504 KB
testcase_06 AC 294 ms
52,556 KB
testcase_07 AC 295 ms
54,704 KB
testcase_08 AC 295 ms
52,696 KB
testcase_09 AC 292 ms
52,696 KB
testcase_10 AC 293 ms
53,108 KB
testcase_11 AC 300 ms
52,652 KB
testcase_12 AC 298 ms
52,584 KB
testcase_13 AC 298 ms
52,836 KB
testcase_14 AC 297 ms
52,812 KB
testcase_15 AC 298 ms
52,752 KB
testcase_16 AC 294 ms
52,736 KB
testcase_17 AC 292 ms
52,512 KB
testcase_18 AC 297 ms
53,108 KB
testcase_19 AC 294 ms
52,844 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 readLineLongArray() : List<Long> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toLong() }
        return ret
    }
    fun readLineLong() : Long {
        val str = readLine() as String
        return str.toLong()
    }
    fun readLineInt() : Int {
        val str = readLine() as String
        return str.toInt()
    }
    fun readLineDoubleArray() : List<Double> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toDouble() }
        return ret
    }
    fun readLineStringArray() : List<String> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        return arrStr
    }

    val inputArrDouble = readLineDoubleArray()
    val p1 = (1-inputArrDouble[0]) * inputArrDouble[1]
    val p2 = inputArrDouble[0] * (1-inputArrDouble[1]) * inputArrDouble[1]
    if (p1 < p2) {
        println("YES")
    } else {
        println("NO")
    }

}
0