#include<cstdio>
#include<vector>
using namespace std;
struct duo{
int xishu,zhishu;
}M;
int main(){
vector<duo> arr;
while(scanf("%d %d",&M.xishu,&M.zhishu)!=EOF){
M.xishu*=M.zhishu;
M.zhishu--;
if(M.zhishu>=0)
arr.push_back(M);
}
if(arr.size()==0) printf("0 0");
else{
for(int i=0;i<arr.size();i++){
if(i!=0)printf(" ");
printf("%d %d",arr[i].xishu,arr[i].zhishu);
}
}
return 0;
}
原文地址:https://www.cnblogs.com/hebust/p/9498126.html
时间: 2024-12-29 06:48:00