結果

問題 No.1806 Rotating Golem
ユーザー 👑 tamatotamato
提出日時 2022-01-14 21:22:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 318 bytes
コンパイル時間 1,723 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 71,640 KB
最終ジャッジ日時 2023-08-12 17:28:53
合計ジャッジ時間 2,449 ms
ジャッジサーバーID
(参考情報)
judge7 / judge9
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,396 KB
testcase_01 AC 73 ms
71,428 KB
testcase_02 AC 75 ms
71,196 KB
testcase_03 AC 72 ms
70,968 KB
testcase_04 AC 72 ms
71,640 KB
testcase_05 AC 71 ms
71,540 KB
testcase_06 AC 72 ms
71,364 KB
testcase_07 AC 71 ms
71,348 KB
testcase_08 AC 71 ms
71,500 KB
testcase_09 AC 72 ms
71,204 KB
testcase_10 AC 73 ms
71,060 KB
testcase_11 AC 73 ms
71,536 KB
testcase_12 AC 72 ms
71,256 KB
testcase_13 AC 72 ms
71,376 KB
testcase_14 AC 72 ms
71,596 KB
testcase_15 AC 74 ms
71,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    A = input().rstrip('\n')
    B = input().rstrip('\n')

    S = "NESW"
    a = S.index(A)
    b = S.index(B)
    if b - a >= 0:
        print(b - a)
    else:
        print(b - a + 4)


if __name__ == '__main__':
    main()
0