Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: anonymous

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-09-30 20:39:28

#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int a,b,x;
    cin >> a >> b >> x;
    int c = a*b , cc = c , len = 0 ;

    while(cc > 0)
    {
        cc /= 10;
        len++;
    }

    if(x > len)
    {
        cout << '_';
    }else
    {
        for(int i = 0;i < len-x;i++)
    {
        c /= 10;
    }

    cout << c%10;
    }



}