結果

問題 No.512 魔法少女の追いかけっこ
ユーザー nobigomunobigomu
提出日時 2018-06-05 00:17:35
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 361 ms / 2,000 ms
コード長 343 bytes
コンパイル時間 11,351 ms
コンパイル使用メモリ 432,508 KB
実行使用メモリ 55,508 KB
最終ジャッジ日時 2024-04-30 18:35:53
合計ジャッジ時間 30,058 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 335 ms
55,304 KB
testcase_01 AC 350 ms
55,132 KB
testcase_02 AC 361 ms
55,408 KB
testcase_03 AC 345 ms
55,284 KB
testcase_04 AC 343 ms
55,268 KB
testcase_05 AC 335 ms
55,376 KB
testcase_06 AC 330 ms
55,208 KB
testcase_07 AC 332 ms
55,196 KB
testcase_08 AC 344 ms
55,384 KB
testcase_09 AC 333 ms
55,244 KB
testcase_10 AC 332 ms
55,288 KB
testcase_11 AC 341 ms
55,228 KB
testcase_12 AC 329 ms
55,328 KB
testcase_13 AC 335 ms
55,440 KB
testcase_14 AC 341 ms
55,264 KB
testcase_15 AC 335 ms
55,160 KB
testcase_16 AC 352 ms
55,244 KB
testcase_17 AC 338 ms
55,132 KB
testcase_18 AC 328 ms
55,268 KB
testcase_19 AC 339 ms
55,240 KB
testcase_20 AC 326 ms
55,252 KB
testcase_21 AC 322 ms
55,168 KB
testcase_22 AC 329 ms
55,248 KB
testcase_23 AC 333 ms
55,272 KB
testcase_24 AC 335 ms
55,392 KB
testcase_25 AC 330 ms
55,316 KB
testcase_26 AC 345 ms
55,312 KB
testcase_27 AC 333 ms
55,228 KB
testcase_28 AC 330 ms
55,296 KB
testcase_29 AC 322 ms
55,124 KB
testcase_30 AC 330 ms
55,128 KB
testcase_31 AC 336 ms
55,324 KB
testcase_32 AC 332 ms
55,320 KB
testcase_33 AC 322 ms
55,336 KB
testcase_34 AC 326 ms
55,248 KB
testcase_35 AC 326 ms
55,272 KB
testcase_36 AC 322 ms
55,260 KB
testcase_37 AC 342 ms
55,212 KB
testcase_38 AC 323 ms
55,264 KB
testcase_39 AC 322 ms
55,300 KB
testcase_40 AC 344 ms
55,324 KB
testcase_41 AC 333 ms
55,204 KB
testcase_42 AC 336 ms
55,136 KB
testcase_43 AC 331 ms
55,268 KB
testcase_44 AC 356 ms
55,248 KB
testcase_45 AC 341 ms
55,340 KB
testcase_46 AC 337 ms
55,144 KB
testcase_47 AC 337 ms
55,268 KB
testcase_48 AC 324 ms
55,248 KB
testcase_49 AC 330 ms
55,508 KB
testcase_50 AC 332 ms
55,236 KB
testcase_51 AC 336 ms
55,332 KB
testcase_52 AC 348 ms
55,248 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:11:10: warning: parameter 'args' is never used
fun main(args : Array<String>) {
         ^

ソースコード

diff #

import java.util.Scanner
fun f(): Boolean {
    val sc = Scanner(System.`in`)
    val x = sc.nextInt()
    val y = sc.nextInt()
    val n = sc.nextInt()
    var a = sc.nextInt()
    for (i in 2..n) { val b=sc.nextInt(); if (a*y>b*x) return false; a=b }
    return true
}
fun main(args : Array<String>) {
    println(if (f()) "YES" else "NO")
}
0