結果
| 問題 | No.648 お や す み |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-30 08:29:58 |
| 言語 | Kotlin (2.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 241 bytes |
| 記録 | |
| コンパイル時間 | 7,694 ms |
| コンパイル使用メモリ | 430,528 KB |
| 実行使用メモリ | 54,220 KB |
| 最終ジャッジ日時 | 2026-05-14 17:58:12 |
| 合計ジャッジ時間 | 24,483 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 79 WA * 5 |
ソースコード
package net.ipipip0129.kotlin.yukicoder
import kotlin.math.sqrt
fun main(args: Array<String>) {
val n = readLine()!!.toLong()
val m = sqrt((n*2).toFloat()).toLong()
println(if ((m*(m+1)/2) == n) "YES\n" + m else "NO")
}