Submission

Status:

PP--PPPP-P

Subtask/Task Score:

70/100

Score: 70

User: Nuchkul

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-02 14:31:41

#include<iostream>
#include<string>
using namespace std;
int main(){
    long long a,b;
    int x;
    cin >> a >> b >> x;
    long long m = a*b;
    string str = to_string(m);
    bool p = false;
    for(int i=0;i<str.length();i++){
        if(i==x-1){
            cout << str[i];
            p = true;
        }
    }
    if(!p) cout << "-";

}