結果

問題 No.2610 Decreasing LCMs
ユーザー inksamuraiinksamurai
提出日時 2024-01-20 00:49:14
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 1,139 bytes
コンパイル時間 2,288 ms
コンパイル使用メモリ 205,496 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-20 00:49:18
合計ジャッジ時間 3,874 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 2 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 2 ms
6,676 KB
testcase_12 AC 2 ms
6,676 KB
testcase_13 AC 2 ms
6,676 KB
testcase_14 AC 2 ms
6,676 KB
testcase_15 AC 2 ms
6,676 KB
testcase_16 AC 1 ms
6,676 KB
testcase_17 AC 2 ms
6,676 KB
testcase_18 AC 2 ms
6,676 KB
testcase_19 AC 2 ms
6,676 KB
testcase_20 AC 2 ms
6,676 KB
testcase_21 AC 2 ms
6,676 KB
testcase_22 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define int ll
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define rng(i,c,n) for(int i=c;i<n;i++)
#define fi first
#define se second
#define pb push_back
#define sz(a) (int)a.size()
#define vec(...) vector<__VA_ARGS__>
#define _48SMghu ios::sync_with_stdio(0),cin.tie(0)
using ll=long long;
using pii=pair<int,int>;
using vi=vector<int>;
void print(){cout<<'\n';}
template<class h,class...t>
void print(const h&v,const t&...u){cout<<v<<' ',print(u...);}

const int lim=1e8;

int lcm(int a,int b){
	return a*b/gcd(a,b);
}

void slv(){
	vi a={5,6,8};
	while(sz(a)<25){
		rep(i,sz(a)){
			a[i]*=2;
		}
		int x=a[1]/2+1;
		while(x%2==0)x+=1;
		a.insert(a.begin(),x);
		// rep(i,sz(a)-1){
		// 	cout<<lcm(a[i],a[i+1])<<" ";
		// }
		// print();
		// rep(i,sz(a)-2){
		// 	// cout<<lcm(a[i],a[i+1])<<" ";
		// 	assert(lcm(a[i],a[i+1])>lcm(a[i+1],a[i+2]));
		// }
		// print();
		// rep(i,sz(a)){
		// 	cout<<a[i]<<" ";
		// 	assert(a[i]<=lim);
		// }
		// break;
	}
	int l;
	cin>>l;
	rep(i,l){
		cout<<a[i]<<" ";
	}
	print();
}

signed main(){
_48SMghu;
	slv();
}
0