Submission
Status:
PP--PPPP-P
Subtask/Task Score:
70/100
Score: 70
User: evevevie
Problemset: เลขหลักของผลคูณ
Language: c
Time: 0.002 second
Submitted On: 2025-10-02 18:11:24
#include <stdio.h>
int main(){
int a, b, x, place, output=1, i, digit=0, temp, hehe;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &place);
x = a*b;
temp = x;
for(i=0;i<=999999;i++){
digit++;
temp=temp/10;
if(temp==0){
break;
}
}
hehe=digit-place;
if(hehe<0){
printf("-");
return 0;
}
output=x;
for(i=0;i<hehe;i++){
output=output/10;
}
output=output%10;
printf("%d", output);
}