結果
| 問題 | No.1992 Tendon Walk |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-01 21:39:15 |
| 言語 | C++17(clang) (17.0.6 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 519 bytes |
| 記録 | |
| コンパイル時間 | 3,901 ms |
| コンパイル使用メモリ | 141,664 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-26 04:21:35 |
| 合計ジャッジ時間 | 4,329 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 |
ソースコード
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
int m = 0, ans = 0;
vector<int> t = {2, 2, -1, -1, 2, -1, -1};
int cnt = 0;
while(m != n) {
m += t[cnt];
ans += abs(t[cnt]);
cnt++;
cnt %= 7;
}
cout << ans << endl;
return 0;
}