Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: mik

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-10 20:33:23

#include <bits/stdc++.h>

using namespace std;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL);
    int a,b,x;
    cin >> a >> b >> x;
    int ans = a*b;
    string s = "";
    if (ans == 0) s = "0";
    while (ans){
        s = char(ans%10+'0') + s;
        ans/=10;
    }
    if (s.size() >= x) {
        cout << s[x-1];
    }
    else cout << "_";
    return 0;
}