結果

問題 No.1806 Rotating Golem
ユーザー brthyyjp
提出日時 2022-01-14 21:23:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 610 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-11-20 07:39:10
合計ジャッジ時間 1,638 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

a = str(input())
b = str(input())
if a == 'E':
    if b == 'E':
        ans = 0
    elif b == 'S':
        ans = 1
    elif b == 'W':
        ans = 2
    else:
        ans = 3
elif a == 'S':
    if b == 'E':
        ans = 3
    elif b == 'S':
        ans = 0
    elif b == 'W':
        ans = 1
    else:
        ans = 2
elif a == 'W':
    if b == 'E':
        ans = 2
    elif b == 'S':
        ans = 3
    elif b == 'W':
        ans = 0
    else:
        ans = 1
else:
    if b == 'E':
        ans = 1
    elif b == 'S':
        ans = 2
    elif b == 'W':
        ans = 3
    else:
        ans = 0
print(ans)
0