#39709: 加油


yp11251123@yphs.tp.edu.tw (704-39黃楷博)

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

#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