結果

問題 No.1806 Rotating Golem
ユーザー toshiro_yanagi
提出日時 2022-07-03 06:31:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 54,120 KB
最終ジャッジ日時 2024-11-28 15:21:43
合計ジャッジ時間 1,733 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    a, b = [input() for _ in range(2)]
    dic = "NESW"

    ans = 0
    t = dic.find(a)
    while t != dic.find(b):
        ans += 1
        t = (t + 1) % len(dic)
    print(ans)


main()
0