Submission
Status:
P------P--
Subtask/Task Score:
20/100
Score: 20
User: ChanakanStudy
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-10 14:17:01
#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);
unsigned long long a,b,x;
cin >> a >> b >> x;
unsigned long long 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;
}