結果
問題 | No.98 円を描こう |
ユーザー | Pump0129 |
提出日時 | 2018-04-08 15:16:54 |
言語 | Kotlin (1.9.23) |
結果 |
WA
|
実行時間 | - |
コード長 | 449 bytes |
コンパイル時間 | 11,182 ms |
コンパイル使用メモリ | 434,152 KB |
実行使用メモリ | 56,968 KB |
最終ジャッジ日時 | 2024-04-30 18:20:05 |
合計ジャッジ時間 | 15,315 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 305 ms
56,808 KB |
testcase_01 | AC | 316 ms
56,756 KB |
testcase_02 | AC | 312 ms
56,828 KB |
testcase_03 | AC | 306 ms
56,832 KB |
testcase_04 | AC | 304 ms
56,796 KB |
testcase_05 | AC | 309 ms
56,748 KB |
testcase_06 | WA | - |
testcase_07 | AC | 308 ms
56,724 KB |
testcase_08 | AC | 310 ms
56,952 KB |
testcase_09 | WA | - |
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^
ソースコード
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)