結果
| 問題 | No.3536 LCM+ELEMENT=SUM |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-08 22:42:19 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,252 bytes |
| 記録 | |
| コンパイル時間 | 2,770 ms |
| コンパイル使用メモリ | 334,396 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-08 22:42:27 |
| 合計ジャッジ時間 | 6,506 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(),v.end()
#define rall(v)v.rbegin(),v.rend()
using ll = long long;
using ull = unsigned long long;
#define iINF 2000000000
#define llINF 9000000000000000000ll
const int MOD9 = 998244353;
const int MOD1 = 1000000000 + 7;
const vector<int> dx = {0,1,0,-1} , dy = {1,0,-1,0};
//chmin , chmax
template<typename T>
bool chmin(T &a , T b){
if(a > b){a = b ; return 1;}
return 0;
}
template<typename T>
bool chmax(T &a , T b){
if(a < b){a = b ; return 1;}
return 0;
}
//io
template<typename T , typename F>
std::istream& operator>>(std::istream& is , pair<T,F> &p){
is >> p.first >> p.second;
return is;
}
template<typename T , typename F>
std::ostream& operator<<(std::ostream& os , const pair<T,F> &p){
os << " [" << p.first << " : " << p.second << "] ";
return os;
}
//vio
template<typename T>
void printv(vector<T> &v){
rep(i,(int)v.size()){
cout<<v[i];
if(i+1 != (int)v.size()) cout<<" ";
}
cout<<endl;
}
template<typename T>
void printvv(vector<vector<T>> &vv){rep(i,(int)vv.size()) printv(vv[i]);}
template<typename T>
void printve(vector<T> &v){
rep(i,(int)v.size()){
cerr<<v[i];
if(i+1 != (int)v.size()) cerr<<" ";
}
cerr<<endl;
}
template<typename T>
void printvve(vector<vector<T>> &vv){rep(i,(int)vv.size()) printve(vv[i]);}
template<typename T>
void vin(vector<T> &v){for(auto &vi : v) cin>>vi;}
template<typename T>
void vvin(vector<vector<T>> &vv){for(auto &vvi : vv) vin(vvi);}
int main(){cin.tie(0);ios::sync_with_stdio(0);
//sum = lcmを作る
//完全数
//64 * 127
//d d d d dってやってったらそれ自身になる。
vector<int> dpow = {1,2,4,8,16,32,64};
vector<int> p1 = {1,127};
vector<int> ans;
for(auto di : dpow) for(auto p1i : p1) ans.push_back(di * p1i);
ans.back() = 1;
int sum = 0;
int LCM = 1;
for(auto ansi : ans){
sum += ansi;
LCM *= ansi / gcd(LCM , ansi);
}
//cout << sum << " " << LCM + ans.back() << endl;
cout << ans.size() << endl;
//cout << 1 << " ";
for(auto ansi : ans) cout << ansi <<" ";
cout << endl;
}