結果

問題 No.1806 Rotating Golem
ユーザー brthyyjpbrthyyjp
提出日時 2022-01-14 21:23:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 610 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 53,632 KB
最終ジャッジ日時 2024-04-30 12:36:17
合計ジャッジ時間 1,554 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,928 KB
testcase_01 AC 40 ms
52,272 KB
testcase_02 AC 40 ms
53,408 KB
testcase_03 AC 41 ms
52,276 KB
testcase_04 AC 41 ms
52,900 KB
testcase_05 AC 40 ms
52,216 KB
testcase_06 AC 40 ms
53,632 KB
testcase_07 AC 40 ms
52,312 KB
testcase_08 AC 41 ms
53,560 KB
testcase_09 AC 42 ms
52,564 KB
testcase_10 AC 42 ms
53,416 KB
testcase_11 AC 39 ms
53,084 KB
testcase_12 AC 39 ms
52,208 KB
testcase_13 AC 40 ms
52,156 KB
testcase_14 AC 40 ms
52,260 KB
testcase_15 AC 40 ms
52,404 KB
権限があれば一括ダウンロードができます

ソースコード

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