結果
| 問題 |
No.113 宝探し
|
| コンテスト | |
| ユーザー |
fV9TwBhUoa9S3eV
|
| 提出日時 | 2019-09-17 09:55:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 237 bytes |
| コンパイル時間 | 528 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-16 22:11:03 |
| 合計ジャッジ時間 | 1,628 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 23 |
ソースコード
s = input()
counts = [0] * 4 # 0:North, 1:East, 2:West, 3:South
directions = 'NEWS'
for i in directions:
counts[directions.index(i)] = s.count(i)
print((((abs(counts[0]) - counts[3]) ** 2 + abs(counts[1] - counts[2]) ** 2)) ** 0.5)
fV9TwBhUoa9S3eV