結果
問題 | No.2198 Concon Substrings (COuNt-CONstruct Version) |
ユーザー |
![]() |
提出日時 | 2023-01-21 02:18:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 803 bytes |
コンパイル時間 | 5,411 ms |
コンパイル使用メモリ | 312,156 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-23 13:49:47 |
合計ジャッジ時間 | 9,443 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 104 |
ソースコード
//#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using ll = long long;#define rep(i, n) for (int i=0; i<(int)(n); ++(i))#define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i))#define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i))#define rep3r(i, m, n) for (int i=(int)(n)-1; (i)>=(int)(m); --(i))#define all(x) (x).begin(), (x).end()const int INF = (int)(1e9);int main() {ll m;cin >> m;vector<int> cvals;rep(i, 3) {if (i < 2) cvals.push_back(m%10000);else cvals.push_back((int)m);m /= 10000;}reverse(all(cvals));string res = string(cvals[0], 'c') + string(10000, 'o') + string(9998, 'n');res += string(cvals[1], 'c') + string(9999, 'o') + string(cvals[2], 'c') + string("on");cout << res << endl;return 0;}