結果
| 問題 |
No.113 宝探し
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-14 00:18:59 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 81 ms / 5,000 ms |
| コード長 | 155 bytes |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-11-16 21:00:27 |
| 合計ジャッジ時間 | 3,100 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 23 |
コンパイルメッセージ
Syntax OK
ソースコード
treasure = gets.chomp.split("")
x = treasure.count("N") - treasure.count("S")
y = treasure.count("E") - treasure.count("W")
puts Math.sqrt(x ** 2 + y ** 2)