Submission

Status:

PP--PPPP-P

Subtask/Task Score:

70/100

Score: 70

User: qweqwe

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-06-13 21:06:51

#include <bits/stdc++.h>
#define speed cin.tie(0)->sync_with_stdio(0)
using namespace std;
using ll=long long;

string change(ll x){
	ll temp=0,ind=0;string t;
	while (temp<x){
		temp=pow(10,ind);
		t+=(x/temp%10)+'0';
		ind++;
	}
	reverse(t.begin(),t.end());
	t.erase(t.begin());
	return t;
}

int main(){
	speed;
	ll a,b;cin >> a >> b;
	ll x=a*b;
	string s=change(x);
	int pos;cin >> pos;
	//cout << s << " ";
	if (s.size()<pos) cout << "_";
	cout << s[pos-1];
	return 0;
}