Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: mik

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

Language: cpp

Time: 0.003 second

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

#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";
    cout << ans << '\n';
    while (ans){
        s = char(ans%10+'0') + s;
        ans/=10;
    }
    if (s.size() >= x) {
        cout << s[x-1];
    }
    else cout << "_";
    return 0;
}