Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: qweqwe
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.003 second
Submitted On: 2025-06-13 21:11:45
#include <bits/stdc++.h>
#define speed cin.tie(0)->sync_with_stdio(0)
using namespace std;
using ll=long long;
string change(ll x){
ll temp=0,ind=0;string t;
while (temp<x){
temp=pow(10,ind);
t+=(x/temp%10)+'0';
ind++;
}
reverse(t.begin(),t.end());
t.erase(t.begin());
return t;
}
int main(){
speed;
ll a,b;cin >> a >> b;
ll x=a*b;
string s=change(x);
int pos;cin >> pos;
//cout << s << " ";
if (s.size()<pos || pos<1) cout << "_";
else cout << s[pos-1];
return 0;
}