当前位置:网站首页>Noi OJ 1.3 20: power C language for computing 2
Noi OJ 1.3 20: power C language for computing 2
2022-06-23 10:29:00 【chd44】
describe
Given a nonnegative integer n, seek 2n.
Input
An integer n.0 <= n < 31.
Output
An integer , namely 2 Of n Power .
Because of the demand 2 Of n Power , So here we introduce pow(), quote pow() Need to use #include<math.h>.
#include<stdio.h>
#include<math.h>
int main(){
int a;
scanf("%d",&a);
int b=pow(2,a);
printf("%d",b);
return 0;
}notes :pow(x,y) Calculation x Of y The next power .
边栏推荐
猜你喜欢
随机推荐
实现领域驱动设计 - 使用ABP框架 - 通用准则
2021-04-16数组
How to pass values to onclick events in thymeleaf
2021-04-16 recursion
Too helpless! Microsoft stopped selling AI emotion recognition and other technologies, saying frankly: "the law can not keep up with the development of AI"
2021-05-11 instanceof and type conversion
搭建一个QQ机器人叫女友起床
What is JSX in the JS tutorial? Why do we need it?
NOI OJ 1.4 03:奇偶数判断 C语言
详解判断大小端的方法
NOI OJ 1.2 整数数据类型存储空间大小
大作业合集
Personal blog system graduation project opening report
Shengshihaotong enables high-quality development with industrial Digitalization
NOI OJ 1.4 04:奇偶ASCII值判断 C语言
Mysql-03. Experience of SQL optimization in work
几款实用软件分享
Liujinhai, architect of zhongang Mining: lithium battery opens up a Xintiandi for fluorine chemical industry
Noi OJ 1.4 03: odd even judging C language
NOI OJ 1.2 10:Hello, World!的大小 C语言









