結果

問題 No.1806 Rotating Golem
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2022-07-03 06:31:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 71,468 KB
最終ジャッジ日時 2023-08-19 02:31:15
合計ジャッジ時間 2,901 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
71,180 KB
testcase_01 AC 58 ms
71,184 KB
testcase_02 AC 62 ms
71,468 KB
testcase_03 AC 63 ms
71,144 KB
testcase_04 AC 62 ms
71,436 KB
testcase_05 AC 59 ms
71,464 KB
testcase_06 AC 61 ms
71,456 KB
testcase_07 AC 59 ms
71,356 KB
testcase_08 AC 59 ms
71,348 KB
testcase_09 AC 58 ms
71,348 KB
testcase_10 AC 58 ms
71,368 KB
testcase_11 AC 60 ms
71,260 KB
testcase_12 AC 59 ms
71,144 KB
testcase_13 AC 59 ms
71,380 KB
testcase_14 AC 61 ms
70,976 KB
testcase_15 AC 60 ms
71,156 KB
権限があれば一括ダウンロードができます

ソースコード

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