結果
問題 |
No.2865 Base 10 Subsets 2
|
ユーザー |
|
提出日時 | 2024-08-30 22:09:45 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 395 bytes |
コンパイル時間 | 1,947 ms |
コンパイル使用メモリ | 199,288 KB |
最終ジャッジ日時 | 2025-02-24 03:06:15 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 TLE * 1 -- * 1 |
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) { ll w = ((N % 10) + 1); st.push(K % w); K /= w; X /= ((N % 10) + 1); N /= 10; } while (!st.empty()) { cout << st.top(); st.pop(); } cout<< endl; }