結果

問題 No.3159 Just Answer 10 Integers!
ユーザー The Forsaking
提出日時 2025-05-23 20:08:57
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 508 bytes
コンパイル時間 1,615 ms
コンパイル使用メモリ 193,592 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-05-23 20:09:02
合計ジャッジ時間 2,261 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
const int N = 2000086, MOD = 1e9 + 7, INF = 0x3f3f3f3f;
ll res;
int n, m, cnt, w[N];

ll lcm(ll a, ll b) { return a * b / __gcd(a, b); }

int main() {
	cin >> n;
	w[1] = 2, w[2] = 3, w[3] = 5, w[4] = 7, w[5] = 11, w[6] = 13;
	w[7] = 17, w[8] = 19, w[9] = 23;
	for (int i = 1; i < n + 1; i++) {
		ll sum = 1;
		for (int j = 1; j <= 9; j++)
			if (i != j)
				sum *= w[j];
		printf("%lld ", sum);
	}
	return 0;
}
0