解题思路:
注意事项:
参考代码:
#include<iostream>
using namespace std;
int main()
{
string str1;
cin>>str1;
int s = int(str1[1])-48;
int chang = 1189;
int duan = 841;
for(int i = 0; i < s; i++){
int t = chang/2;
if(t > duan){
chang = t;
}
else{
chang = duan;
duan = t;
}
}
cout<<chang<<endl;
cout<<duan<<endl;
}
0.0分
3 人评分