#39708: c++答


yp11251144@yphs.tp.edu.tw (704-38曾湛)

學校 : 臺北市私立延平高級中學
編號 : 237373
來源 : [203.72.178.1]
最後登入時間 :
2024-03-14 17:42:31
a466. 12289 - One-Two-Three -- UVa12289 | From: [203.72.178.1] | 發表日期 : 2024-03-21 17:22

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
int n;
cin>>n;
while(n--){
string s;
cin>>s;
if(s.size()==5){cout<<3<<endl; continue;
}
int wrong=0;
if(s[0]!='o') wrong++;
if(s[1]!='n') wrong++;
if(s[2]!='e') wrong++;
if(wrong<=1) cout<<1<<endl;
else cout<<2<<endl;
}
 
}
 
 
 
 
 
 
 
 
 
ZeroJudge Forum