Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: Nuttykub

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

Language: cpp

Time: 0.003 second

Submitted On: 2026-10-01 22:35:06

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    
    string s;
    getline(cin,s);
    int t,a,m;
    string ans;
    cin >> t >> a >> m;
    if (t == 1){
        if (a <= 15) ans = "Master";
        else ans = "Mr.";
    }
    else{
        if (a <= 15 or m == 0) ans = "Miss";
        else ans = "Mrs.";
    }
    cout << ans << " " << s;
}