結果
| 問題 | No.2766 Delicious Multiply Spice |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-14 10:32:44 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 423 bytes |
| 記録 | |
| コンパイル時間 | 2,201 ms |
| コンパイル使用メモリ | 333,352 KB |
| 実行使用メモリ | 7,336 KB |
| 最終ジャッジ日時 | 2026-07-13 05:56:04 |
| 合計ジャッジ時間 | 6,448 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 -- * 5 |
| other | -- * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;cin>>n;
vector<char>ans;
while(n!=1){
if(n%2==1) {n--;n/=2; ans.push_back('A');}
if(n%3==1){n--;n/=3; ans.push_back('B');}
}
reverse(ans.begin(),ans.end());
for(auto x:ans) cout << x;
}