Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: ST68030

Problemset: เลขหลักของผลคูณ

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-13 09:16:37

#include <bits/stdc++.h>
using namespace std;
int main(){
    int a,b,x,d,c,ans;
    c=0;
    cin>>a>>b>>x;
    d=a*b;
    int temp = d;
    while(temp > 0) {
        c++;
        //cout<<"*";
        temp /= 10;
    }
    if(x>c){
        printf("_");
        return 0;
    }
    for(int i=0;i<=c-x;i++){
        ans=d%10;
        d/=10;
    }
   cout<<ans;
}