Submission
Status:
P-PPPPPPPP
Subtask/Task Score:
90/100
Score: 90
User: ST68030
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-13 09:15:39
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,x,d,c,ans;
c=0;
cin>>a>>b>>x;
d=a*b;
int temp = d;
while(temp > 1) {
c++;
//cout<<"*";
temp /= 10;
}
if(x>c){
printf("_");
return 0;
}
for(int i=0;i<=c-x;i++){
ans=d%10;
d/=10;
}
cout<<ans;
}