結果

問題 No.1806 Rotating Golem
ユーザー 310icecrystal310icecrystal
提出日時 2023-06-23 01:31:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 1,787 ms
コンパイル使用メモリ 86,468 KB
実行使用メモリ 71,204 KB
最終ジャッジ日時 2023-09-12 19:41:48
合計ジャッジ時間 2,581 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,204 KB
testcase_01 AC 69 ms
70,904 KB
testcase_02 AC 68 ms
71,084 KB
testcase_03 AC 68 ms
71,096 KB
testcase_04 AC 69 ms
71,140 KB
testcase_05 AC 69 ms
71,004 KB
testcase_06 AC 68 ms
71,196 KB
testcase_07 AC 68 ms
71,196 KB
testcase_08 AC 66 ms
70,924 KB
testcase_09 AC 68 ms
70,940 KB
testcase_10 AC 70 ms
70,888 KB
testcase_11 AC 69 ms
70,768 KB
testcase_12 AC 71 ms
71,064 KB
testcase_13 AC 70 ms
70,888 KB
testcase_14 AC 70 ms
70,948 KB
testcase_15 AC 70 ms
70,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = input()
B = input()

def f(x):
    if x == "E":
        return "S"
    if x == "S":
        return "W"
    if x == "W":
        return "N"
    if x == "N":
        return "E"

count = 0
while A != B:
    A = f(A)
    count += 1
print(count)
0