题解 | 【模板】位运算Ⅱ ‖ 整体位移

【模板】位运算Ⅱ ‖ 整体位移

https://www.nowcoder.com/practice/3fb5a81504084bdeb86bf938f446250d

#include <iostream>
using namespace std;

int main() {
    int t;
    cin>>t;
    while(t--){
        int op,n,chi;
        cin>>op>>n>>chi;
        if(op==1)cout<<(n<<chi)<<endl;
        else cout<<(n>>chi)<<endl;
    }
    return 0;
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

SaviorSu:直接说下学期可以请假,一般情况学校允许我26届,大三就直接去实习了
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务