結果
| 問題 | No.1351 Sum of GCD Equals LCM |
| コンテスト | |
| ユーザー |
hayaten
|
| 提出日時 | 2021-01-17 13:28:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 686 bytes |
| 記録 | |
| コンパイル時間 | 1,886 ms |
| コンパイル使用メモリ | 192,500 KB |
| 最終ジャッジ日時 | 2025-01-18 00:29:46 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 50 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n - 1); i >= 0; i--)
#define ALL(v) v.begin(), v.end()
using namespace std;
using P = pair<int, int>;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int main() {
int n;
cin >> n;
vector<int> A(n);
rep(i, n){
if(i == n-1){
A[i] = n;
}else{
A[i] = 1;
}
}
rep(i, n){
cout << A[i] << (i == n - 1 ? "\n" : " ");
}
}
hayaten