Submission

Status:
PPPPP

Score: 100

User: Namkhing

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-04-11 15:47:35

#include <bits/stdc++.h>
using namespace std;


int main() {
    cin.tie(nullptr)->ios_base::sync_with_stdio(false);
    string a, b;
    cin >> a >> b;
    int c, d, e;
    cin >> c >> d >> e;
    if (c == 1) {
        if (d < 15) cout << "Master ";
        else cout << "Mr. ";
    }
    else {
        if (d < 15) cout << "Miss ";
        else {
            if (e == 0) cout << "Miss ";
            else cout << "Mrs. ";
        }
    }
    cout << a << " " << b;
}