結果

問題 No.113 宝探し
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2019-12-11 10:40:47
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 260 ms / 5,000 ms
コード長 215 bytes
コンパイル時間 10,942 ms
コンパイル使用メモリ 410,808 KB
実行使用メモリ 51,968 KB
最終ジャッジ日時 2023-08-10 15:37:04
合計ジャッジ時間 19,146 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 259 ms
50,144 KB
testcase_01 AC 258 ms
50,152 KB
testcase_02 AC 257 ms
50,108 KB
testcase_03 AC 257 ms
50,160 KB
testcase_04 AC 257 ms
50,152 KB
testcase_05 AC 257 ms
50,280 KB
testcase_06 AC 260 ms
51,968 KB
testcase_07 AC 257 ms
50,212 KB
testcase_08 AC 258 ms
50,152 KB
testcase_09 AC 253 ms
50,164 KB
testcase_10 AC 253 ms
50,448 KB
testcase_11 AC 255 ms
50,168 KB
testcase_12 AC 254 ms
50,060 KB
testcase_13 AC 253 ms
50,300 KB
testcase_14 AC 258 ms
50,152 KB
testcase_15 AC 258 ms
50,536 KB
testcase_16 AC 254 ms
50,372 KB
testcase_17 AC 255 ms
50,040 KB
testcase_18 AC 257 ms
50,032 KB
testcase_19 AC 255 ms
50,156 KB
testcase_20 AC 254 ms
50,376 KB
testcase_21 AC 257 ms
50,112 KB
testcase_22 AC 255 ms
50,360 KB
testcase_23 AC 255 ms
50,400 KB
testcase_24 AC 257 ms
50,080 KB
testcase_25 AC 257 ms
50,252 KB
testcase_26 AC 257 ms
50,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    val k = readLine()!!.toCharArray()
    println(kotlin.math.hypot((k.count { it == 'N' } - k.count() { it == 'S' }).toDouble(),
        (k.count { it == 'W' } - k.count { it == 'E' }).toDouble()))
}
0