| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2146 人关注过本帖
标题:[求助]找最大整数的问题!
取消只看楼主 加入收藏
zhanghuan_10
Rank: 1
等 级:新手上路
威 望:2
帖 子:751
专家分:0
注 册:2006-10-25
收藏
 问题点数:0 回复次数:6 
[求助]找最大整数的问题!

看了n遍,还是没有什么好的思路!没有找到什么规律来!大概的意思就是计算一个数n的m次幂,然后在得数里找到一个各个位上的数最大的那个数!请大家指点一下!
A hard puzzle
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 1106 Accepted Submission(s) : 373

Problem Description


lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT problem,so lcy makes the problem easier than begin.
this puzzle describes that: gave a and b,how to know the a^b's the last digit number.But everybody is too lazy to slove this problem,so they remit to you who is wise.

Input


There are mutiple test cases. Each test cases consists of two numbers a and b(0<a,b<=2^30)

Output


For each test case, you should output the a^b's last digit number.

Sample Input


7 66
8 800

Sample Output


9
6

搜索更多相关主题的帖子: 整数 
2006-12-14 16:11
zhanghuan_10
Rank: 1
等 级:新手上路
威 望:2
帖 子:751
专家分:0
注 册:2006-10-25
收藏
得分:0 

哦。知道了!看见e文就头疼啊!last楞看成largest没办法!


该学习了。。。
2006-12-14 16:43
zhanghuan_10
Rank: 1
等 级:新手上路
威 望:2
帖 子:751
专家分:0
注 册:2006-10-25
收藏
得分:0 
意思就是给你两个数m和n,包括多组测试数据!要你得出m的n次幂这个结果中的最后一位数字是什么?呵呵!这回应该没有理解错!

该学习了。。。
2006-12-14 16:53
zhanghuan_10
Rank: 1
等 级:新手上路
威 望:2
帖 子:751
专家分:0
注 册:2006-10-25
收藏
得分:0 

平方和与立方和 在这发一下得了!大家看看,我觉得没有什么错误,但是总是wa,这是什么原因啊!
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 1585 Accepted Submission(s) : 434

Problem Description


给定一段连续的整数,求出他们中所有偶数的平方和以及所有奇数的立方和。

Input


输入数据包含多组测试实例,每组测试实例包含一行,由两个整数m和n组成。


Output


对于每组输入数据,输出一行,应包括两个整数x和y,分别表示该段连续的整数中所有偶数的平方和以及所有奇数的立方和。
你可以认为32位整数足以保存结果。


Sample Input


1 3
2 5

Sample Output


4 28
20 152


#include <stdio.h>
#include <stdlib.h>

int main()
{
int j;
double c, d;

while(scanf("%lf%lf", &c, &d) == 2)
{
double sum1 = 0, sum2 = 0;

for(j = c;j <= d;j ++)
{
if(j % 2 == 0)
{
sum1 += j * j;
}
else
{
sum2 += j * j * j;
}
}
printf("%.0lf %.0lf\n\n", sum1, sum2);
}
return 0;
}


该学习了。。。
2006-12-14 17:07
zhanghuan_10
Rank: 1
等 级:新手上路
威 望:2
帖 子:751
专家分:0
注 册:2006-10-25
收藏
得分:0 
Wrong Answer还是啊!个人觉得应该没有什么错误啊!

该学习了。。。
2006-12-14 20:44
zhanghuan_10
Rank: 1
等 级:新手上路
威 望:2
帖 子:751
专家分:0
注 册:2006-10-25
收藏
得分:0 
这个你上面的我没有看懂!

该学习了。。。
2006-12-14 20:47
zhanghuan_10
Rank: 1
等 级:新手上路
威 望:2
帖 子:751
专家分:0
注 册:2006-10-25
收藏
得分:0 
用对数得到的不是位数吗!可以得到那个数字吗?

该学习了。。。
2006-12-15 13:09
快速回复:[求助]找最大整数的问题!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022600 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved