結果

問題 No.113 宝探し
ユーザー otsunekootsuneko
提出日時 2021-05-07 09:07:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 5,000 ms
コード長 208 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 71,856 KB
最終ジャッジ日時 2023-10-13 00:16:08
合計ジャッジ時間 4,095 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,724 KB
testcase_01 AC 71 ms
71,724 KB
testcase_02 AC 69 ms
71,688 KB
testcase_03 AC 74 ms
71,692 KB
testcase_04 AC 70 ms
71,856 KB
testcase_05 AC 70 ms
71,764 KB
testcase_06 AC 69 ms
71,756 KB
testcase_07 AC 68 ms
71,624 KB
testcase_08 AC 73 ms
71,784 KB
testcase_09 AC 73 ms
71,840 KB
testcase_10 AC 73 ms
71,768 KB
testcase_11 AC 72 ms
71,592 KB
testcase_12 AC 73 ms
71,768 KB
testcase_13 AC 72 ms
71,260 KB
testcase_14 AC 72 ms
71,080 KB
testcase_15 AC 72 ms
71,768 KB
testcase_16 AC 70 ms
71,752 KB
testcase_17 AC 72 ms
71,248 KB
testcase_18 AC 71 ms
71,372 KB
testcase_19 AC 70 ms
71,528 KB
testcase_20 AC 70 ms
71,360 KB
testcase_21 AC 72 ms
71,612 KB
testcase_22 AC 75 ms
71,608 KB
testcase_23 AC 72 ms
71,636 KB
testcase_24 AC 71 ms
71,620 KB
testcase_25 AC 71 ms
71,444 KB
testcase_26 AC 71 ms
71,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = list(input())
x = y = 0
for s in S:
    if s == "N":
        y += 1
    elif s == "E":
        x += 1
    elif s == "W":
        x -= 1
    elif s == "S":
        y -= 1
print((x**2+y**2)**0.5)
0