結果
問題 |
No.1806 Rotating Golem
|
ユーザー |
![]() |
提出日時 | 2022-01-14 21:21:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 2,122 ms |
コンパイル使用メモリ | 191,804 KB |
最終ジャッジ日時 | 2025-01-27 10:48:35 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include<bits/stdc++.h> using namespace std; string S = "ESWN"; int main() { char A,B; cin >> A >> B; int id1 = 0,id2 = 0; for(int i = 0; i < 4; i++) { if(A == S[i]) { id1 = i; } if(B == S[i]) { id2 = i; } } cout << (id2+4-id1)%4 << endl; }