Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Weathery

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-07 12:26:06

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

int main() {
	int a,b,c,x;
	string s;
	cin >> a >> b >> x;
	c=a*b;
	do{
		s+=(char)(c%10+'0');
		c/=10;
	} while(c);
	reverse(s.begin(),s.end());
	if (s.size()>=x && x>0) cout << s[x-1];
	else cout << '_';
	return 0;
}