文章

25

粉丝

0

获赞

104

访问

19.2k

头像
二叉树 题解:
P1233 北京大学机考题
发布于 2026年2月
阅读数 834

#include <bits/stdc++.h>
using namespace std;

int main(){
    int a,b;
    while(cin>>a>>b){
        while(a!=b){
            if(a<b)
                swap(a,b);
            a/=2;
        }
        cout<<a<<endl;
    }
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发