結果

問題 No.113 宝探し
ユーザー pypypymipypypymi
提出日時 2022-02-16 11:40:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 5,000 ms
コード長 138 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 71,852 KB
最終ジャッジ日時 2023-09-11 17:08:32
合計ジャッジ時間 3,856 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,720 KB
testcase_01 AC 70 ms
71,188 KB
testcase_02 AC 71 ms
71,788 KB
testcase_03 AC 70 ms
71,764 KB
testcase_04 AC 73 ms
71,248 KB
testcase_05 AC 72 ms
71,236 KB
testcase_06 AC 70 ms
71,680 KB
testcase_07 AC 69 ms
71,400 KB
testcase_08 AC 70 ms
71,852 KB
testcase_09 AC 69 ms
71,412 KB
testcase_10 AC 69 ms
71,720 KB
testcase_11 AC 69 ms
71,400 KB
testcase_12 AC 72 ms
71,556 KB
testcase_13 AC 70 ms
71,092 KB
testcase_14 AC 72 ms
71,148 KB
testcase_15 AC 71 ms
71,712 KB
testcase_16 AC 71 ms
71,640 KB
testcase_17 AC 70 ms
71,192 KB
testcase_18 AC 70 ms
71,204 KB
testcase_19 AC 72 ms
71,760 KB
testcase_20 AC 71 ms
71,672 KB
testcase_21 AC 70 ms
71,800 KB
testcase_22 AC 69 ms
71,608 KB
testcase_23 AC 70 ms
71,512 KB
testcase_24 AC 69 ms
71,652 KB
testcase_25 AC 71 ms
71,564 KB
testcase_26 AC 72 ms
71,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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