結果
| 問題 |
No.113 宝探し
|
| コンテスト | |
| ユーザー |
kiridaruma
|
| 提出日時 | 2016-03-07 20:50:59 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 290 bytes |
| コンパイル時間 | 2,379 ms |
| コンパイル使用メモリ | 146,028 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 03:12:28 |
| 合計ジャッジ時間 | 3,439 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 23 |
ソースコード
import std.stdio, std.math, std.string;
void main(){
string str = readln.strip;
auto
n = str.count('N'),
s = str.count('S'),
w = str.count('W'),
e = str.count('E');
double tmp = (n-s)^^2;
tmp += (w-e)^^2;
auto res = tmp.sqrt;
writefln("%f", res);
}
kiridaruma