結果

問題 No.1806 Rotating Golem
ユーザー nao109
提出日時 2022-12-06 15:31:38
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 345 bytes
コンパイル時間 2,117 ms
コンパイル使用メモリ 192,724 KB
最終ジャッジ日時 2025-02-09 05:47:43
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define all(a) a.begin(),a.end()
int main(){
  string s="NESW";
  char a,b;
  cin >> a >> b;
  for(int i=0; i<4; ++i){
    for(int j=0; j<4; ++j){
      if(a==s[i] && b==s[j]){
        cout << (j-i+4)%4 << endl;
      }
    }
  }
  return 0;
}
0