結果

問題 No.113 宝探し
ユーザー ldsyb
提出日時 2016-02-29 18:30:24
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 284 bytes
コンパイル時間 468 ms
コンパイル使用メモリ 60,676 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-24 12:50:25
合計ジャッジ時間 1,687 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 6 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <cmath>
using namespace std;

int main(){
   int length = 0;
   string s;
   cin >> s;
   for(int i = 0;i < s.size();i++){
      if(s[i] == 'N' || s[i] == 'E') length++;
      else length--;
   }
   cout << sqrt(abs(length)) << endl;;
}
0