题解 | 小红喜欢1
小红喜欢1
https://www.nowcoder.com/practice/cbd0c91f821847a4bb1c5115405f6eda
#include <iostream>
using namespace std;
int main() {
int i = 1,a;
while(i<=5){
cin >>a;
if(a==1){
cout << i << endl;
}
i++;
}
}

查看10道真题和解析