Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: mik

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

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-11 10:10:20

#include <bits/stdc++.h>

using namespace std;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(NULL);
    string n,l;
    int g,a,y;
    cin >> n >> l >> g >> a >> y;
    if (g==1){
        if (a>15) cout << "Mr. " << n << ' ' << l;
        else cout << "Master " << n << ' ' << l;
    }
    if (g==0){
        if (a<=15) cout << "Miss " << n << ' ' << l;
        else{
            if (y==0) cout << "Miss " << n << ' ' << l;
            else cout << "Mrs. " << n << ' ' << l;
        }
    }
    return 0;
}