E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
HDU1097
ACM-数论之A hard puzzle——
hdu1097
AhardpuzzleProblemDescriptionlcygivesahardpuzzletofeng5166,lwg,JGShiningandIgnatius:gaveaandb,howtoknowthea^b.everybodyobjectstothisBTproblem,solcymakestheproblemeasierthanbegin.thispuzzledescribestha
ltree98
·
2020-09-15 14:59
ACM-数论
漫漫刷题路
HDU1097
A hard puzzle
点这里题意:算a的b次方的最后一位数。#includeusingnamespacestd;intmain(){inta,b;while(~scanf("%d%d",&a,&b)){a%=10;b%=4;if(!b)b=4;a=pow(a,b);printf("%d\n",a%10);}return0;}
伊莎贝拉•狗剩
·
2020-09-14 04:59
刷题
数学
HDU1097
Descriptionlcygivesahardpuzzletofeng5166,lwg,JGShiningandIgnatius:gaveaandb,howtoknowthea^b.everybodyobjectstothisBTproblem,solcymakestheproblemeasierthanbegin. thispuzzledescribesthat:gaveaandb,howto
longshanxiaoxuesheng
·
2015-11-29 12:00
hdu1097
求幂的个位
想通了的话这道题目很easy。其实对这种什么取个位,取模一个很小的数的都应当想到打表。像这个题目就完全可以作为一个模版使用了。。 #include<iostream> using namespace std; const int tab[10][4]={{0,0,0,0},{1,1,1,1},{2,4,8,6},{3,9,7,1},{4,6,4,6},{5,5,5,5},{
·
2015-11-08 10:35
HDU
Hdu1097
(计算a的b次幂最后一位数值)
1 #include <stdio.h> 2 #include <math.h> 3 int main() 4 { 5 int Num1,Num2; 6 while(scanf("%d %d",&Num1,&Num2)!=EOF) 7 { 8 p
·
2015-11-03 22:33
HDU
简单的快速幂取模
HDU1097
本题为快速幂取模运算,直接套用模板即可//题目描述:给你数a,b,让你输出a^b的最后一位#include #include usingnamespacestd; #defineLLlonglong
xiaotan1314
·
2015-08-26 16:00
HDU
快速幂
hdu1097
A hard puzzle
AhardpuzzleTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):27417 AcceptedSubmission(s):9761ProblemDescriptionlcygivesahardpuzzletofeng5166,lwg,JGShinin
svtter
·
2014-10-17 23:00
编程
C++
c
算法
编程语言
hdu1097
A hard puzzle
AhardpuzzleTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):27417 AcceptedSubmission(s):9761ProblemDescriptionlcygivesahardpuzzletofeng5166,lwg,JGShinin
svtter
·
2014-10-17 23:00
编程
C++
c
算法
编程语言
HDU1097
A hard puzzle
AhardpuzzleTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):29415 AcceptedSubmission(s):10581ProblemDescriptionlcygivesahardpuzzletofeng5166,lwg,JGShini
u012846486
·
2014-08-27 21:00
HDU1097
HDU1097
A hard puzzle
#includeusingnamespacestd;intquick_mod(inta,intb){ intans=1; while(b>=1) { if(b&1) ans=((ans%10)*(a%10))%10;//如果不分开取模(ans=ans*a%10)就有可能越界,提交就会WA; b=b>>1; a=((a%10)*(a%10))%10;//同ans的取模
AC_Gibson
·
2014-08-11 12:00
hdu1097
ProblemDescriptionlcygivesahardpuzzletofeng5166,lwg,JGShiningandIgnatius:gaveaandb,howtoknowthea^b.everybodyobjectstothisBTproblem,solcymakestheproblemeasierthanbegin.thispuzzledescribesthat:gaveaandb
u011459262
·
2013-07-20 11:00
hdu1097
A hard puzzle
#include #include usingnamespacestd; longf(longa,longb,longm); intmain() { longa,b; while(cin>>a>>b) { cout<
wuli2496
·
2012-05-20 00:00
c
include
HDU1097
http://acm.hdu.edu.cn/showproblem.php?pid=1097一道找规律的数学题,a^b的最后一位数,其实这个数是有规律的,在1到9中,最长的周期是4,就是说,4^1=4,4^2=6,4^3=4,4^4=6,结构都是写最后以为而已,4的周期是3,最长的是4,所以就以4为周期来求就可以了,注意要用long的类型,不然数据就爆了#include usingnamespac
Kay_Sprint
·
2011-10-20 19:00
A hard puzzle ACM
HDU1097
A hard puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13437 Accepted Submission(s): 4677 Pr
·
2011-08-01 10:00
ACM
HDU 1097
HDU1097
AhardpuzzleTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission
tctony
·
2007-11-29 12:00
上一页
1
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他