結果

問題 No.1806 Rotating Golem
ユーザー 89
提出日時 2022-02-12 01:53:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 51,968 KB
最終ジャッジ日時 2024-06-28 01:12:11
合計ジャッジ時間 1,590 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

a = input()
b = input()
#E, W, S, N
if a == "E":
    a = 0
if a == "S":
    a = 1
if a == "W":
    a = 2
if a == "N":
    a = 3
if b== "E":
    b = 0
if b == "S":
    b = 1
if b == "W":
    b = 2
if b == "N":
    b = 3
cnt = 0
while True:
    #print(a,b)
    if a ==b:
        print(cnt)
        exit()
    a += 1
    a %= 4
    cnt += 1
0