HAI
I HAS A TUX
GIMMEH TUX
I HAS A FOO ITS 0
I HAS A BAR ITS 0
I HAS A BAZ ITS 0
I HAS A QUZ ITS 1
TUX IS NOW A NUMBR
IM IN YR LOOP NERFIN YR TUX TIL BOTH SAEM TUX AN 0
I HAS A PUR
GIMMEH PUR
PUR IS NOW A NUMBR
FOO R SUM OF FOO AN PUR
BAR R SUM OF BAR AN 1
BOTH SAEM BIGGR OF PRODUKT OF FOO AN QUZ AN PRODUKT OF BAR BAZ AN PRODUKT OF FOO AN QUZ
O RLY?
YA RLY
BAZ R FOO
QUZ R BAR
OIC
IM OUTTA YR LOOP
BAZ IS NOW A NUMBAR
VISIBLE SMOOSH QUOSHUNT OF BAZ QUZ
KTHXBYE
上面的代码求翻译成汉语翻译啊 或者写成C或C++的代码也可以
求~!! 急急急~!!!
------解决方案--------------------
这是LOLCODE...是一种脑残的编程语言。。。你把这个代码翻译成别的语言就能交了。。
int main(){//HAI
double tux , foo = 0 , bar = 0 , baz = 0 , quz = 1;
/*I HAS A TUX
I HAS A FOO ITS 0
I HAS A BAR ITS 0
I HAS A BAZ ITS 0
I HAS A QUZ ITS 1*/
cin >> tux;//GIMMEH TUX TUX IS NOW A NUMBR
for(int i = tux ; i > 0 ; i--){//IM IN YR LOOP NERFIN YR TUX TIL BOTH SAEM TUX AN 0
double pur;//I HAS A PUR
cin >> pur;//GIMMEH PUR PUR IS NOW A NUMBR
foo += pur;//FOO R SUM OF FOO AN PUR
bar+=1;//BAR R SUM OF BAR AN 1
if(max(foo * quz , bar * baz) == foo * quz){
//BOTH SAEM BIGGR OF PRODUKT OF FOO AN QUZ AN PRODUKT OF BAR BAZ AN PRODUKT OF FOO AN QUZ O RLY? YA RLY
baz = foo;//BAZ R FOO
quz = bar;//QUZ R BAR
}
else//OIC
break;//IM OUTTA YR LOOP
}
cout << baz / quz << endl;//BAZ IS NOW A NUMBAR VISIBLE SMOOSH QUOSHUNT OF BAZ QUZ
return 0;//KTHXBYE
}