結果

問題 No.1992 Tendon Walk
ユーザー sotanishysotanishy
提出日時 2022-07-01 21:57:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 71,636 KB
最終ジャッジ日時 2023-08-17 09:30:56
合計ジャッジ時間 1,514 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,404 KB
testcase_01 AC 65 ms
71,372 KB
testcase_02 AC 65 ms
71,412 KB
testcase_03 AC 64 ms
71,412 KB
testcase_04 AC 66 ms
71,296 KB
testcase_05 AC 66 ms
71,320 KB
testcase_06 AC 68 ms
71,636 KB
testcase_07 AC 67 ms
71,368 KB
testcase_08 AC 65 ms
71,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

X = int(input())
ans = 0
x = 0
for _ in range(100):
    for d in [2, 2, -1, -1, 2, -1, -1]:
        x += d
        ans += abs(d)
        if x == X:
            print(ans)
            exit()

0