結果
| 問題 | No.98 円を描こう |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-08 15:16:54 |
| 言語 | Kotlin (2.4.10 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 449 bytes |
| 記録 | |
| コンパイル時間 | 7,576 ms |
| コンパイル使用メモリ | 481,496 KB |
| 実行使用メモリ | 46,560 KB |
| 最終ジャッジ日時 | 2026-09-27 02:18:13 |
| 合計ジャッジ時間 | 10,177 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 WA * 2 |
ソースコード
package net.ipipip0129.kotlin.yukicoder
fun main(args: Array<String>) {
val data = readLine()!!.split(" ")
val pos = Pos(data[0].toDouble(), data[1].toDouble())
val dis = Math.sqrt(Math.pow(pos.x, 2.0) + Math.pow(pos.y, 2.0))
if (dis == dis.toLong().toDouble()) {
println(dis.toLong() * 2 + 1)
}else {
println(Math.ceil(dis).toLong() * 2)
}
}
private class Pos(val x: Double, val y: Double)