結果

問題 No.113 宝探し
ユーザー yaoshimax
提出日時 2015-03-27 01:32:48
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 183 bytes
コンパイル時間 656 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2024-11-16 20:42:12
合計ジャッジ時間 1,282 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
S=raw_input()
x,y=0,0
for s in S:
    if s=='N':
        y+=1
    if s=='E':
        x+=1
    if s=='W':
        x-=1
    if s=='S':
        y-=1
print math.sqrt(x*x+y*y)
0