#23775: 為甚麼是這樣??


70545 (10520蘇柏叡)

學校 : 臺北市私立延平高級中學
編號 : 128503
來源 : [203.72.178.2]
最後登入時間 :
2024-05-01 10:43:32
a135. 12250 - Language Detection -- UVa12250 | From: [203.72.178.252] | 發表日期 : 2020-12-16 17:40

/*#include <iostream> 

 

using namespace std;

 

int main()

 

 

string n;

 

int i=1; 

 

while(cin>>n)

 

{

 

if (n=="HELLO")cout<<"Case "<<i<<": ENGLISH"<<endl;

 

else if (n=="HOLA")cout<<"Case "<<i<<": SPANISH"<<endl;

 

else if (n=="HALLO")cout<<"Case "<<i<<": GERMAN"<<endl;

 

else if (n=="BONJOUR")cout<<"Case "<<i<<": FRENCH"<<endl;

 

else if (n=="CIAO")cout<<"Case "<<i<<": ITALIAN"<<endl;

 

else if (n=="ZDRAVSTVUJTE")cout<<"Case "<<i<<": RUSSIAN"<<endl;

 

else cout<<"Case "<<i<<": UNKNOWN"<<endl;

 

i++;

 

}

 

}

 

它顯示:(請勿輸出題目未要求的文字: 

Case 304: UNKNOWN)

 
#23777: Re:為甚麼是這樣??


jam930725@gmail.com (浮沉沉沉沉沉沉沉沉)

學校 : 國立臺中科技大學
編號 : 124762
來源 : [123.240.115.224]
最後登入時間 :
2022-08-27 13:56:53
a135. 12250 - Language Detection -- UVa12250 | From: [45.148.11.20] | 發表日期 : 2020-12-16 19:26

/*#include  

 

using namespace std;

 

int main()

 

 

string n;

 

int i=1; 

 

while(cin>>n)

 

{

 

if (n=="HELLO")cout<<"Case "<<i<<": ENGLISH"<<endl;

 

else if (n=="HOLA")cout<<"Case "<<i<<": SPANISH"<<endl;

 

else if (n=="HALLO")cout<<"Case "<<i<<": GERMAN"<<endl;

 

else if (n=="BONJOUR")cout<<"Case "<<i<<": FRENCH"<<endl;

 

else if (n=="CIAO")cout<<"Case "<<i<<": ITALIAN"<<endl;

 

else if (n=="ZDRAVSTVUJTE")cout<<"Case "<<i<<": RUSSIAN"<<endl;

 

else cout<<"Case "<<i<<": UNKNOWN"<<endl;

 

i++;

 

}

 

}

 

它顯示:(請勿輸出題目未要求的文字: 

Case 304: UNKNOWN)


輸入以僅含有一個「#」的一行作為結束,該行不需處理。

 
ZeroJudge Forum