Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Dark_kingdom

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

Language: cpp

Time: 0.005 second

Submitted On: 2026-10-08 00:58:19

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

int main()
{
	long long A, B;

	cin>>A;

	cin>>B;
	string c = to_string(A * B);
	int x;

	if(!(cin>>x)) return 0;
	
	if (x-1<0 || x-1>=c.length())
	{
		cout<<"_";
	}
	
	else
	{
		if (c[x-1] == ' ')
		{
			cout<<"_";
		}
		else
		{
			cout<< c[x-1];
		}
	}
	return 0;
}