Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: purihorharin
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.002 second
Submitted On: 2026-03-20 09:55:43
#include <iostream>
#include <cstdlib>
using namespace std;
int main () {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int a, b, x;
cin >> a >> b >> x;
a *= b;
int c=1, i=0;
while (c < a) c*=10, i++;
if (i < x) {
std::cout << '_';
return 0;
}
for (; x < i; x++) a /= 10;
std::cout << a % 10;
}