C++ 代码
#include<iostream>
#include<cmath>
using namespace std;
int l=1189,w=841;
pair<int,int> a[10];
int main()
{
a[0].first=l,a[0].second=w;
for(int i=1;i<10;i++)
{
l=floor(l/2.0);
if(l<w)
{
int t=l;
l=w;
w=t;
}
a[i].first=l,a[i].second=w;
}
char op[2];
scanf("%s",op);
printf("%d\n%d",a[op[1]-'0'].first,a[op[1]-'0'].second);
return 0;
}