結果
問題 |
No.3159 Just Answer 10 Integers!
|
ユーザー |
|
提出日時 | 2025-05-23 20:49:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 405 bytes |
コンパイル時間 | 1,941 ms |
コンパイル使用メモリ | 196,212 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-05-23 20:49:11 |
合計ジャッジ時間 | 3,794 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:14:37: warning: integer overflow in expression of type ‘int’ results in ‘-2120241362’ [-Woverflow] 14 | ll base = 2*3*5*7*11*13*17*19*23*29; | ~~~~~~~~~~~~~~~~~~~~~~^~~
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vvl = vector<vl>; using ull = unsigned long long; int N; int main(){ cin >> N; vl primes = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29}; ll base = 2*3*5*7*11*13*17*19*23*29; vl ans; for (int i=0; i<N; i++){ ans.push_back(base/primes[i]); } for (auto a: ans) cout << a << " "; }