結果

問題 No.98 円を描こう
ユーザー Pump0129Pump0129
提出日時 2018-04-08 15:19:08
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 312 ms / 5,000 ms
コード長 338 bytes
コンパイル時間 11,394 ms
コンパイル使用メモリ 432,508 KB
実行使用メモリ 56,848 KB
最終ジャッジ日時 2024-04-30 18:20:55
合計ジャッジ時間 15,030 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 305 ms
56,824 KB
testcase_01 AC 309 ms
56,792 KB
testcase_02 AC 310 ms
56,688 KB
testcase_03 AC 312 ms
56,652 KB
testcase_04 AC 310 ms
56,848 KB
testcase_05 AC 307 ms
56,804 KB
testcase_06 AC 307 ms
56,844 KB
testcase_07 AC 305 ms
56,736 KB
testcase_08 AC 304 ms
56,696 KB
testcase_09 AC 307 ms
56,696 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

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))

    println((dis * 2).toLong() + 1)
}

private class Pos(val x: Double, val y: Double)
0