Submission

Status:

--PP------

Subtask/Task Score:

20/100

Score: 20

User: PutterThecityboy

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

Language: cpp

Time: 0.003 second

Submitted On: 2026-10-05 19:26:03

#include <iostream>
#include <cmath>
using namespace std;
int main(){
    int a, b, n, y, z, k, l;
    cin >> a >> b >> n;
    long long x;
    x = a*b;
    l = x;
    int count = 0;
    while (l > 0) {
        l /= 10;
        count++;
    }
    if (count < x){
        cout << '_';
    }
    else {


    y = x / (pow(10, count - n));
    z = y%10;

    cout << z;
    }
    




    return 0;
}