結果

問題 No.113 宝探し
ユーザー あかりきあかりき
提出日時 2021-02-09 21:37:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 167 bytes
コンパイル時間 1,049 ms
コンパイル使用メモリ 87,148 KB
実行使用メモリ 72,020 KB
最終ジャッジ日時 2023-09-21 09:24:24
合計ジャッジ時間 3,540 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,916 KB
testcase_01 AC 72 ms
71,668 KB
testcase_02 AC 70 ms
71,448 KB
testcase_03 AC 71 ms
71,720 KB
testcase_04 AC 73 ms
72,000 KB
testcase_05 AC 71 ms
71,792 KB
testcase_06 AC 69 ms
72,020 KB
testcase_07 AC 71 ms
71,864 KB
testcase_08 AC 72 ms
71,992 KB
testcase_09 AC 74 ms
71,916 KB
testcase_10 AC 73 ms
71,668 KB
testcase_11 AC 70 ms
71,568 KB
testcase_12 AC 72 ms
71,672 KB
testcase_13 AC 70 ms
71,540 KB
testcase_14 AC 68 ms
71,088 KB
testcase_15 AC 68 ms
71,904 KB
testcase_16 AC 70 ms
71,932 KB
testcase_17 AC 71 ms
71,144 KB
testcase_18 AC 71 ms
71,576 KB
testcase_19 AC 68 ms
71,824 KB
testcase_20 AC 68 ms
71,896 KB
testcase_21 AC 67 ms
71,756 KB
testcase_22 AC 68 ms
71,832 KB
testcase_23 AC 70 ms
71,620 KB
testcase_24 AC 70 ms
71,672 KB
testcase_25 AC 68 ms
71,668 KB
testcase_26 AC 70 ms
71,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s=list(input())
x=0;y=0
for i in range(len(s)):
  if s[i]=='N':
    y+=1
  elif s[i]=='S':
    y-=1
  elif s[i]=='E':
    x+=1
  else:
    x-=1
print((x**2+y**2)**0.5)
0