結果
問題 | No.1351 Sum of GCD Equals LCM |
ユーザー |
![]() |
提出日時 | 2021-01-17 14:45:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 532 bytes |
コンパイル時間 | 1,708 ms |
コンパイル使用メモリ | 169,992 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-29 16:24:04 |
合計ジャッジ時間 | 3,512 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 50 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)#define rep(i,n) REP(i,0,n)#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)#define ALLOF(c) (c).begin(), (c).end()typedef long long ll;typedef unsigned long long ull;int main(){int N;cin >> N;vector<ll> v{1};REP(i,2,N+1){ll x = v[v.size()-1] * 2;v.push_back(x);}rep(i,v.size()){if(i>0) cout << " ";cout << v[i];}cout << endl;return 0;}