Submission

Status:

PP--PPPP-P

Subtask/Task Score:

70/100

Score: 70

User: posnfor2

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-15 10:52:45

#include <iostream>
#include <string>

using namespace std;

int main()
{
    long long a , b;
    int pos;
    if(!(cin >> a >> b >> pos)) return 0;
    long long x = a * b;
    string s = to_string(x);
    if(pos > 0 && pos <= (int)s.size()){
        cout << s[pos - 1];
    }
    else{
        cout << " ";
    }
    return 0;
}