結果

問題 No.113 宝探し
コンテスト
ユーザー a_ten
提出日時 2016-03-28 16:01:41
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 56 ms / 5,000 ms
+ 63µs
コード長 187 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 61 ms
コンパイル使用メモリ 80,704 KB
実行使用メモリ 80,896 KB
最終ジャッジ日時 2026-07-18 04:36:46
合計ジャッジ時間 3,177 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#coding:utf-8

from math import sqrt

S=raw_input()

x=0
y=0
for i in S:
	if i=='N':
		y+=1
	elif i=='S':
		y-=1
	elif i=='E':
		x+=1
	else:
		x-=1

ans=sqrt(pow(x,2)+pow(y,2))

print ans
0