結果
| 問題 |
No.2198 Concon Substrings (COuNt-CONstruct Version)
|
| コンテスト | |
| ユーザー |
FplusFplusF
|
| 提出日時 | 2023-01-20 23:04:34 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,206 bytes |
| コンパイル時間 | 3,320 ms |
| コンパイル使用メモリ | 191,804 KB |
| 最終ジャッジ日時 | 2025-02-10 05:28:27 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 WA * 43 OLE * 39 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
using ll=long long;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll,ll>;
const ll INF=(1ll<<60);
template<class T> void chmin(T &a,T b){
if(a>b){
a=b;
}
}
template<class T> void chmax(T &a,T b){
if(a<b){
a=b;
}
}
ll modpow(ll a,ll b,ll mod){
if(b==0) return 1;
ll p=a,ret=1;
for(ll i=0;i<=62;i++){
if(b&(1ll<<i)){
ret*=p;
ret%=mod;
}
p=(p%mod)*(p%mod);
p%=mod;
}
return ret;
}
int main(){
ll m;
cin >> m;
if(m==0) cout << "a" << endl;
for(ll i=1;i<=1e4;i++){
for(ll j=1;j<=1e4;j++){
if(m%(i*j)==0){
rep(c,i) cout << "c";
rep(o,j) cout << "o";
rep(n,m/(i*j)) cout << "n";
cout << endl;
return 0;
}else if(m%(i*j)==i){
rep(c,i) cout << "c";
rep(o,j) cout << "o";
rep(n,m/(i*j)-1) cout << "n";
cout << "on" << endl;
return 0;
}
}
}
assert(0);
}
FplusFplusF