結果

問題 No.113 宝探し
ユーザー R N
提出日時 2020-09-04 21:11:24
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 269 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-26 11:31:54
合計ジャッジ時間 1,947 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 3
other AC * 14 RE * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding=UTF-8:
import math
import collections

coordinates = str(input())

cList = collections.Counter(coordinates)
cDict = dict(cList)

moveA = abs(cDict['E'] - cDict['W'])
moveB = abs(cDict['N'] - cDict['S'])

ans = math.sqrt(moveA**2 + moveB**2)
print(round(ans,5))
0