求一个数字的2次方

可以用位运算

int ans=1<<weishu;
posted @ 2022-12-21 16:41  Szang  阅读(256)  评论(0)    收藏  举报