Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: anonymous

Problemset: คำนำหน้าชื่อ

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-01 16:10:07

#include <bits/stdc++.h>

using namespace std;

int main()
{
	int gen,old,marry;
	string n,sn;
	cin >> n >> sn >> gen >> old >> marry;
	if(gen == 0)
	{
		if(marry == 1)
		{
			cout << "Mrs. ";
		}else
		{
			cout << "Miss ";
		}
	}
	else
	{
		if(old <= 15)cout << "Master ";
		else cout << "Mr. ";
	}
	cout << n << ' ' << sn;
}