結果

問題 No.648  お や す み 
ユーザー Pump0129Pump0129
提出日時 2018-03-30 08:21:54
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 8,398 ms
コンパイル使用メモリ 424,808 KB
実行使用メモリ 54,468 KB
最終ジャッジ日時 2024-04-30 17:57:16
合計ジャッジ時間 31,151 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 241 ms
54,096 KB
testcase_01 AC 247 ms
54,252 KB
testcase_02 AC 247 ms
54,144 KB
testcase_03 AC 245 ms
54,304 KB
testcase_04 AC 237 ms
54,276 KB
testcase_05 AC 245 ms
54,088 KB
testcase_06 AC 244 ms
54,032 KB
testcase_07 AC 250 ms
54,108 KB
testcase_08 AC 245 ms
54,172 KB
testcase_09 AC 244 ms
54,192 KB
testcase_10 AC 245 ms
54,192 KB
testcase_11 AC 245 ms
54,100 KB
testcase_12 AC 246 ms
54,100 KB
testcase_13 AC 244 ms
54,152 KB
testcase_14 AC 251 ms
54,320 KB
testcase_15 AC 247 ms
54,240 KB
testcase_16 AC 242 ms
54,248 KB
testcase_17 AC 243 ms
54,264 KB
testcase_18 AC 239 ms
54,092 KB
testcase_19 AC 241 ms
54,168 KB
testcase_20 AC 244 ms
54,224 KB
testcase_21 AC 247 ms
54,284 KB
testcase_22 AC 251 ms
54,124 KB
testcase_23 AC 248 ms
54,272 KB
testcase_24 AC 247 ms
54,252 KB
testcase_25 AC 254 ms
54,096 KB
testcase_26 AC 255 ms
54,104 KB
testcase_27 AC 251 ms
54,220 KB
testcase_28 AC 250 ms
54,220 KB
testcase_29 AC 250 ms
54,084 KB
testcase_30 AC 246 ms
54,212 KB
testcase_31 AC 243 ms
54,060 KB
testcase_32 AC 242 ms
54,208 KB
testcase_33 AC 244 ms
54,196 KB
testcase_34 AC 240 ms
54,388 KB
testcase_35 AC 245 ms
54,268 KB
testcase_36 AC 242 ms
54,240 KB
testcase_37 AC 247 ms
54,164 KB
testcase_38 AC 246 ms
54,108 KB
testcase_39 AC 248 ms
54,172 KB
testcase_40 AC 242 ms
54,336 KB
testcase_41 AC 266 ms
54,248 KB
testcase_42 AC 245 ms
54,096 KB
testcase_43 AC 249 ms
54,272 KB
testcase_44 AC 244 ms
54,260 KB
testcase_45 AC 250 ms
54,212 KB
testcase_46 AC 246 ms
54,392 KB
testcase_47 AC 246 ms
54,164 KB
testcase_48 AC 245 ms
54,256 KB
testcase_49 AC 251 ms
54,280 KB
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 AC 257 ms
54,184 KB
testcase_61 AC 260 ms
54,180 KB
testcase_62 AC 244 ms
54,120 KB
testcase_63 AC 247 ms
54,072 KB
testcase_64 AC 249 ms
54,096 KB
testcase_65 AC 277 ms
54,088 KB
testcase_66 AC 244 ms
54,104 KB
testcase_67 AC 248 ms
54,172 KB
testcase_68 AC 241 ms
54,204 KB
testcase_69 AC 243 ms
54,288 KB
testcase_70 AC 240 ms
54,324 KB
testcase_71 AC 242 ms
54,412 KB
testcase_72 AC 246 ms
54,256 KB
testcase_73 AC 246 ms
54,236 KB
testcase_74 AC 252 ms
54,200 KB
testcase_75 AC 248 ms
54,336 KB
testcase_76 AC 247 ms
54,240 KB
testcase_77 WA -
testcase_78 WA -
testcase_79 WA -
testcase_80 WA -
testcase_81 WA -
testcase_82 AC 247 ms
54,172 KB
testcase_83 AC 253 ms
54,312 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:5:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package net.ipipip0129.kotlin.yukicoder

import kotlin.math.sqrt

fun main(args: Array<String>) {
    val n = readLine()!!.toLong()
    val m = sqrt((n*2).toDouble()).toInt()
    println(if ((m*(m+1)/2).toLong() == n) "YES\n" + m else "NO")
}
0