Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: Kidmaiok

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-11 22:00:50

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define space << ' '
#define nl << endl

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    string n;
    getline(cin,n);
    int a,b,c;
    cin >> a >> b >> c;
    if(a == 0){
        if(b < 15 || c == 0){
            cout << "Miss " << n;
        }else{
            cout << "Mrs. " << n;
        }
    }else{
        if(b < 15){
            cout << "Master " << n;
        }else{
            cout << "Mr. " << n;
        }
    }
    
}