結果

問題 No.2865 Base 10 Subsets 2
ユーザー Carpenters-CatCarpenters-Cat
提出日時 2024-08-30 22:09:45
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 395 bytes
コンパイル時間 2,093 ms
コンパイル使用メモリ 206,384 KB
実行使用メモリ 668,272 KB
最終ジャッジ日時 2024-08-30 22:09:51
合計ジャッジ時間 5,614 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 MLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0