結果

問題 No.113 宝探し
ユーザー ktshun
提出日時 2015-05-29 17:06:07
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 238 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2024-11-16 20:56:57
合計ジャッジ時間 1,862 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-
import math
if __name__ == "__main__":
	s = raw_input()
	x = 0
	y = 0
	for i in s:
		if i == "N":
			y += 1
		if i == "E":
			x += 1
		if i == "W":
			x -= 1
		if i == "S":
			y -= 1
	print math.sqrt(x **2 + y ** 2)
0