题解 | #2的n次方计算#

2的n次方计算

http://www.nowcoder.com/practice/35a1e8b18658411388bc1672439de1d9

import java.util.Scanner;
public class Main {
    public static void main(String[]args){
        Scanner in = new Scanner(System.in);
        int input = in.nextInt();
        int count=1;
        for(int i=0;i<input;i++)
        {
            count=2*count;
        }
        System.out.println(count);
    }
}
全部评论

相关推荐

牛客51274894...:照片认真的吗,找个专门拍证件照的几十块钱整端正点吧,要不就别加照片
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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