結果

問題 No.1992 Tendon Walk
ユーザー atjh16
提出日時 2022-07-23 09:59:49
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 249 bytes
コンパイル時間 2,345 ms
コンパイル使用メモリ 192,412 KB
最終ジャッジ日時 2025-01-30 13:17:32
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int x, i, j, m;

int main()
{
	cin >> x;

	while (i != x) {
		int u = j % 7;

		if (u == 0 || u == 1 || u == 4) {
			i += 2;
			m += 2;
		}
		else {
			i--;
			m++;
		}

		j++;
	}

	cout << m << endl;
}
0