結果

問題 No.2609 Decreasing GCDs
ユーザー soldray
提出日時 2024-01-22 19:21:05
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 506 bytes
コンパイル時間 814 ms
コンパイル使用メモリ 128,468 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-28 06:28:09
合計ジャッジ時間 1,732 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;

using i64 = long long;

#define yn(pope) (pope ? "Yes" : "No")

#define rep(i, n, m) for (int i = (n); i < (m); i++)
#define rrep(i, n, m) for (int i = (n); i > m; i--)

#define IINF (1 << 30)
#define INF (1ll << 60)

#define all(v) v.begin(), v.end()

int main() {
  int N; cin >> N;
  int sum = 0;

  rep(i, 0, N) {
    sum += (1 << (N - i));

    cout << sum << " ";
  }

  cout << endl;
  return 0;
}
0