結果
| 問題 |
No.2865 Base 10 Subsets 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-30 22:08:06 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 348 bytes |
| コンパイル時間 | 1,973 ms |
| コンパイル使用メモリ | 197,976 KB |
| 最終ジャッジ日時 | 2025-02-24 03:05:28 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main () {
ll N, K;
cin >> N >> K;
ll X = 1;
{
string s = to_string(N);
for (auto& a : s) {
X *= (a - '0') + 1ll;
}
}
stack<int> st;
while (K) {
st.push(K % X);
X /= ((N % 10) + 1);
N /= 10;
}
while (!st.empty()) {
cout << st.top();
}
cout<< endl;
}