結果
問題 |
No.1806 Rotating Golem
|
ユーザー |
|
提出日時 | 2022-01-28 22:13:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 2,319 ms |
コンパイル使用メモリ | 191,896 KB |
最終ジャッジ日時 | 2025-01-27 16:42:01 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; string s[2]; int a[2]; int main() { cin >> s[0] >> s[1]; for (int i = 0; i < 2; i++) { if (s[i] == "N") a[i] = 0; else if (s[i] == "E") a[i] = 1; else if (s[i] == "S") a[i] = 2; else a[i] = 3; } cout << (a[1] - a[0] + 4) % 4 << endl; }