結果

問題 No.1992 Tendon Walk
ユーザー sotanishysotanishy
提出日時 2022-07-01 21:57:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 467 ms
コンパイル使用メモリ 82,920 KB
実行使用メモリ 53,272 KB
最終ジャッジ日時 2024-05-04 16:22:16
合計ジャッジ時間 1,236 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
52,004 KB
testcase_01 AC 32 ms
52,648 KB
testcase_02 AC 31 ms
52,640 KB
testcase_03 AC 33 ms
51,944 KB
testcase_04 AC 32 ms
52,864 KB
testcase_05 AC 32 ms
52,068 KB
testcase_06 AC 35 ms
53,272 KB
testcase_07 AC 31 ms
52,932 KB
testcase_08 AC 30 ms
52,520 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