結果
| 問題 |
No.113 宝探し
|
| コンテスト | |
| ユーザー |
ohana
|
| 提出日時 | 2023-09-26 17:47:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 214 bytes |
| コンパイル時間 | 221 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 52,608 KB |
| 最終ジャッジ日時 | 2024-07-19 11:44:39 |
| 合計ジャッジ時間 | 2,384 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 23 |
ソースコード
import math
s = input()
NW = {"N": (1, 0), "S": (-1, 0), "W": (0, -1), "E": (0, 1)}
dir = [0, 0]
for c in s:
dir[0] += NW[c][0]
dir[1] += NW[c][1]
print(dir)
print(math.sqrt(dir[0] ** 2 + dir[1] ** 2))
ohana