結果
| 問題 |
No.648 お や す み
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-30 08:29:58 |
| 言語 | Kotlin (2.1.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 241 bytes |
| コンパイル時間 | 10,263 ms |
| コンパイル使用メモリ | 429,752 KB |
| 実行使用メモリ | 54,280 KB |
| 最終ジャッジ日時 | 2024-11-20 15:15:59 |
| 合計ジャッジ時間 | 37,059 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 79 WA * 5 |
コンパイルメッセージ
Main.kt:5:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
^
ソースコード
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")
}