Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: UNJE0o

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

Language: cpp

Time: 0.004 second

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

#include <bits/stdc++.h>
#define en '\n'
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    
    int sx,ld,mr;
    string nm;
    getline(cin,nm);
    cin >> sx >> ld >> mr;

    if(sx == 0){
        if(ld < 15) cout << "Miss ";
        else{
            if(mr == 0) cout << "Miss ";
            else cout << "Mrs. ";
        }
    }

    if(sx == 1){
        if(ld < 15) cout << "Master ";
        else{
            cout << "Mr. ";
        }
    }

    cout << nm;

}