Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: korn234
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-12 22:23:26
#include <iostream>
#include <cmath>
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int a, b, x;
cin>>a>>b>>x;
int mul=a*b;
string num=to_string(mul);
x--;
if(num[x]-'0'>=0&&num[x]-'0'<=9){
cout<<num[x]-'0';
}
else {
cout<<"_";
}
}