Submission

Status:

P-PP---PP-

Subtask/Task Score:

50/100

Score: 50

User: ChanakanStudy

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-10 14:10:32

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <queue>
#include <stack>
#include <climits>
#include <map>
#include <numeric>
#include <iomanip>
using namespace std;
using ll = long long;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    ll a,b,x;
    cin >> a >> b >> x;
    ll sum = a*b;
    if(sum < pow(10 , x-1)) {
        cout << "_";
        return 0;
    }
    else {
        string s = to_string(sum);
        cout << s[s.size()-x];
    }

    return 0;
}