結果

問題 No.1806 Rotating Golem
ユーザー iii aaa
提出日時 2022-01-29 21:32:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 1,090 ms
コンパイル使用メモリ 82,320 KB
実行使用メモリ 53,712 KB
最終ジャッジ日時 2025-01-02 17:46:16
合計ジャッジ時間 2,353 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
def inputSynario():
    input = stdin.readline
    A = input().rstrip()
    B = input().rstrip()
    return A,B

def toNum(str):
    if(str=="N"):
        return 0
    elif(str=="E"):
        return 3
    elif(str=="S"):
        return 2
    else:
        return 1

(A,B)=inputSynario()
a = toNum(A)+4
b = toNum(B)
print((a-b)%4)
0