Submission
Status:
PPxxPPPPxP
Subtask/Task Score:
70/100
Score: 70
User: Sunsblad
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.005 second
Submitted On: 2026-09-30 18:38:16
#include<iostream>
#include<stack>
using namespace std;
int main(){
long long int a,b,x;
stack<int> l;
cin>>a>>b>>x;
a *= b;
while(a > 0){
l.push(a%10);
a /= 10;
}
for(int i = 0; i<x; i++){
if(i == x-1){
cout<<l.top();
}else{
l.pop();
}
}
}