Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: nunos

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-03 17:02:25

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

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    string name;getline(cin,name);
    int g=0;
    int age=0;
    int st=0;
    cin >>g>>age>>st;
    if(g==1){
        if(age<=15){ cout << "Master " << name; return 0;}
        else{ cout << "Mr. " << name; return 0;}
    }else{
        if(age<=15){ cout << "Miss " << name; return 0;}
        else{
            if(st==0){  cout << "Miss " << name; return 0;}
            else{  cout << "Mrs. " << name; return 0;}
        }
    }
    return 0;
}