Submission
Status:
P-PP----P-
Subtask/Task Score:
40/100
Score: 40
User: Sense.exe
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.005 second
Submitted On: 2026-09-25 22:50:14
#include <bits/stdc++.h>
using namespace std;
int main() {
int A,B,x;
cin >> A >> B >> x;
vector<char> v;
string s = to_string(A*B);
if(A<=100000&&B<=100000&&x<=100000) {
for(auto x:s) {
v.push_back(x);
}
sort(v.begin(),v.end());
if(v.size()-1>=x) { //ตอนแรก (v[x-1])!=string::npos ซึ่งผิด
cout << (v[x-1]-'0');
}
else {
cout << "_";
}
}
}