結果
問題 |
No.113 宝探し
|
ユーザー |
![]() |
提出日時 | 2024-06-20 04:23:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 5,000 ms |
コード長 | 210 bytes |
コンパイル時間 | 382 ms |
コンパイル使用メモリ | 82,244 KB |
実行使用メモリ | 54,012 KB |
最終ジャッジ日時 | 2024-06-20 04:23:45 |
合計ジャッジ時間 | 3,153 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 23 |
ソースコード
from math import dist S = input() x = y = 0 for c in S: match c: case 'N': y += 1 case 'E': x += 1 case 'S': y -= 1 case 'W': x -= 1 ans = dist((0, 0), (x, y)) print(ans)