Submission

Status:
PPPPPPP-PP

Score: 90

User: Nathlol2

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

Language: cpp

Time: 0.002 second

Submitted On: 2024-10-17 17:13:14

#include <iostream>
#include <vector>

using namespace std;

int main(){
    int n, m, x;
    cin >> n >> m >> x;
    long long s = n * m;
    vector<int> digits;
    while(s > 0){
        int d = s % 10;
        digits.push_back(d);
        s = s / 10;
    }
    int size = digits.size();
    if(x < size){
        cout << digits[size - x];
    }else cout << "_";
}