贪心算法problem L(1012)
来源:互联网 发布:centos如何安装ssh 编辑:程序博客网 时间:2024/05/19 15:41
1.简明题意
就是求m的n次幂。
2.解题思路
直接用c++ pow函数就可以
3,感想
我想这题可能是需要用到大数方面的知识,但没有超出double的范围,所以就用了pow函数
4.代码
#include<iostream>#include<math.h>using namespace std;int main(){ double n, m; int result; while (cin >> m >> n) { result = (int)(pow(n, 1.0 / m) + 0.5); cout << result << endl; } return 0;}
0 0
- 贪心算法problem L(1012)
- 贪心算法 problem M
- 1012 Problem L
- 1012 Problem L
- 1012 Problem L
- Activity Selection Problem 贪心算法
- 贪心算法—Problem A
- 贪心算法—Problem E
- 贪心算法 Problem A 1000
- 贪心算法 Problem B 1001
- 贪心算法 Problem E 1004
- 贪心算法 Problem G 1006
- 贪心算法—Problem C
- 贪心算法—Problem G
- 贪心算法—Problem Q
- 贪心算法 Problem Q 1016
- 贪心算法—Problem F
- 贪心算法—Problem M
- 2016第七届蓝桥杯C/C++ B组省赛第五题:抽签
- hdu4786-图论训练3-最小生成树
- VC++6.0常出现的后缀名及其含义大全
- python核心编程 第二版 第五章 习题
- Android自定义ImageView实现圆形控件显示
- 贪心算法problem L(1012)
- 组合数学训练 (16.03.29)
- C语言单链表的创建,插入,删除,逆致
- 深入理解 Java 虚拟机-Java 语法糖
- 面试中遇到的SQL题目
- 50个经典常用的sql语句
- Longest Substring with At Most K Distinct Characters
- 五种Button监听方式总结
- npm介绍