結果

問題 No.1992 Tendon Walk
ユーザー 👑 rin204rin204
提出日時 2022-07-01 21:22:59
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 71,580 KB
最終ジャッジ日時 2023-08-17 08:29:35
合計ジャッジ時間 1,700 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,228 KB
testcase_01 AC 73 ms
71,484 KB
testcase_02 AC 73 ms
71,068 KB
testcase_03 AC 74 ms
71,064 KB
testcase_04 AC 71 ms
71,084 KB
testcase_05 AC 74 ms
71,480 KB
testcase_06 AC 73 ms
71,284 KB
testcase_07 AC 72 ms
71,316 KB
testcase_08 AC 74 ms
71,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x = int(input())
ans = [-1] * 15
pos = 0
t = 0
cnt = 0
lst = [2, 2, -1, -1, 2, -1, -1]
while 1:
    try:
        if ans[pos] == -1:
            ans[pos] = cnt
    except:
        break
    cnt += abs(lst[t])
    pos += lst[t]
    t += 1
    if t == 7:
        t = 0

print(ans[x])
0