Submission
Status:
----------
Subtask/Task Score:
0/100
Score: 0
User: Ballmaii
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.005 second
Submitted On: 2026-10-09 00:34:44
#include <iostream>
using namespace std;
int main()
{
long long int a,b,x,c,c1,p=0,m;
cout<<"A = ";
cin>>a;
cout<<"B = ";
cin>>b;
cout<<"x = ";
cin>>x;
c = a*b;
c1 =c;
for(int i=1;i<=999999;i++)
{
if(c>0)
{
c = c/10;
p = p+1;
}
}
if(x>p)
{
cout<<"_";
return 0;
}
m = p-x;
for(int j =1;j<=m;j++)
{
c1 = c1/10;
}
cout<<c1%10;
}