版本比较
如何写多组数据的题
正文
增加 3 行删除 3 行
20 行未改动2122232425262526272829305 行未改动363738394040414243442 行未改动20 行未改动#include<bits/stdc++.h>using namespace std;int main(){ int n; while(cin>>n&&n){//也可以写n!=0 cout<<n<<"\n"; while(cin>>n&&n){//也可以写n!=0 cout<<n<<"\n"; } return 0;}
5 行未改动using namespace std;int main(){ int n; while(cin>>n){ cout<<n; cout<<n; } return 0;}
2 行未改动