結果

問題 No.1806 Rotating Golem
ユーザー 8989
提出日時 2022-02-12 01:53:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 946 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 71,584 KB
最終ジャッジ日時 2023-09-10 09:44:38
合計ジャッジ時間 3,391 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,512 KB
testcase_01 AC 70 ms
71,524 KB
testcase_02 AC 72 ms
71,224 KB
testcase_03 AC 71 ms
71,424 KB
testcase_04 AC 71 ms
71,580 KB
testcase_05 AC 71 ms
71,280 KB
testcase_06 AC 70 ms
71,584 KB
testcase_07 AC 71 ms
71,276 KB
testcase_08 AC 68 ms
71,420 KB
testcase_09 AC 71 ms
71,292 KB
testcase_10 AC 71 ms
71,384 KB
testcase_11 AC 71 ms
71,376 KB
testcase_12 AC 70 ms
71,360 KB
testcase_13 AC 72 ms
71,500 KB
testcase_14 AC 71 ms
71,504 KB
testcase_15 AC 71 ms
71,336 KB
権限があれば一括ダウンロードができます

ソースコード

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