Submission
Status:
PPPPPPPPPP
Score: 100
User: tankunkid
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.001 second
Submitted On: 2024-10-15 19:40:41
#include <stdio.h>
int main() {
int A, B, x;
scanf("%d%d%d", &A, &B, &x);
long long sum = A*B;
long long tem = sum;
int cnt = 0;
int arr[500];
while (tem != 0) {
arr[cnt] = tem % 10;
cnt++;
tem /= 10;
}
if (x > cnt || x < 1) {
printf("_");
} else {
printf("%d", arr[cnt-x]);
}
}