Submission
Status:
PP--PPPP-P
Subtask/Task Score:
70/100
Score: 70
User: Sunsblad
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-25 18:08:15
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int num = 0, num2 = 0, x = 0, len = 0, numa = 0;
cin >> num >> num2 >> x;
num = num * num2;
numa = num;
while(num>0)
{
num = num / 10;
len += 1;
}
len = len - x;
num2 = 1;
for (int i = 0; i<len;i++)
{
num2 *= 10;
}
numa = numa / num2;
cout << numa % 10;
}