結果

問題 No.1292 パタパタ三角形
ユーザー hir355hir355
提出日時 2020-11-20 21:47:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 80,796 KB
最終ジャッジ日時 2023-09-30 19:06:46
合計ジャッジ時間 2,761 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,316 KB
testcase_01 AC 79 ms
71,280 KB
testcase_02 AC 76 ms
71,452 KB
testcase_03 AC 74 ms
71,276 KB
testcase_04 AC 73 ms
71,332 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 99 ms
76,668 KB
testcase_15 AC 98 ms
76,860 KB
testcase_16 AC 97 ms
76,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

dxdy = ((1, 0), (0, 1), (0, 1), (-1, 0), (0, -1), (0, -1))
ABC = ('a', 'b', 'c')
s = input()
st = set([(0, 0)])
t = 0
x, y = 0, 0
for c in s:
    k = ABC.index(c) * 2 + t
    dx, dy = dxdy[k % 6]
    x += dx
    y += dy
    st.add((x, y))
    t += 3
    t %= 6
print(len(st))
0