HDOJ 2035 人见人爱A^B

利用 Docker Distribution 搭建私有的 Docker Registry 1、拓扑 阅读详情

人见人爱A^B

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 35605    Accepted Submission(s): 24216


Problem Description
求A^B的最后三位数表示的整数。
说明:A^B的含义是“A的B次方”
 

Input
输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的结束,不做处理。
 

Output
对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。
 

Sample Input
2 3 12 6 6789 10000 0 0
 

Sample Output
8 984 1
后三位快速幂对1000取余。做了几道快速幂的题之后发现,这种模板题五分钟一道才是正常的。之前我WA到怀疑人生也是6微笑
#include<stdio.h>
__int64 fff(__int64 x,__int64 y)
{
	__int64 ans=1;
	x=x%1000;
	while(y)
	{
		if(y%2==1)
		ans=(ans*x)%1000;
		x=(x*x)%1000;
		y=y/2;
	}
	return ans;
}
int main()
{
	__int64 a,b;
	while(scanf("%I64d%I64d",&a,&b)&&a||b)
	{
		printf("%I64d\n",fff(a,b));
	}
	return 0;
}


通信原理 | python调制识别数据及代码 数据集包含了从-20dB 到+18dB 总共 20 个信噪比(步长为 2)下的 11 种调制信号, 包括 AM-DSB、 AM-SSB 和 WBFM 三种模拟调制信号,以及 BPSK、 QPSK、 8PSK、 CPFSK、 GFSK、 PAM4、 QAM16 和 QAM64 八种数字调制信号。其中信号的中心频率为 200KHz,采样频率为 1Msamp/s,且每个信噪比下每种调制信号包含 1000 个信号。其中每个信号包含 IQ 两路数据,且每一路数据都包含有 128 个采样点。 阅读详情

相关推荐

手把手教你排查I2C通信故障:当上拉电阻配置不当会发生什么?

本文深入解析I2C通信中上拉电阻配置不当导致的常见故障,包括波形畸变和通信失败现象。通过示波器波形分析和系统化解决方案,帮助工程师快速诊断和优化I2C总线性能,特别适用于嵌入式系统和智能设备开发场景。

weixin_33725722的博客 346

HDOJ-2035.人见人爱A^B(详解-多注释)

/*Problem Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的结束,不做处理。 Output 对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sample Input ...

Hunter_Kevin的博客 814

面板数据门槛归回分析,xthreg的安装,xthreg2安装包

我用的是Stata17,数据是不平衡的面板数据,需要用到xthreg2,虽然我找到了xthreg2.ado,但是还需要安装xthreg,因为运行xthreg2需要xthreg包顺带安装的lxthreg.mlib文件。但是!我后来发现还是不行,最后是去买了一个真正能用到xthreg2的lxthreg.mlib文件,才可以运行。

weixin_55252589的博客 1万+

HDOJ 2035 人见人爱A^B 超详细

HDOJ 2035 人见人爱A^B Problem Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的结束,不做处理。 Output 对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sample Input 2 3 12 6 6789 10000 0 0 Sample Outpu

qascetic的博客 1084

麒麟KylinV10系统yum源更换全攻略:从官方源到第三方仓库的保姆级教程

本文详细介绍了麒麟KylinV10系统yum源的更换与优化方法,包括官方源配置、第三方仓库集成及RPM包管理技巧。通过实战案例和命令示例,帮助用户快速解决软件依赖问题,提升系统管理效率。特别适合需要在国产操作系统上进行开发的工程师参考。

weixin_30752699的博客 656

GNSS接收机性能测试全攻略:从实验室到真实场景

本文系统介绍了GNSS接收机从实验室到真实场景的完整性能测试流程。首先通过GNSS模拟器进行射频传导测试,评估接收机的基础性能;其次进行天线OTA测试,考察整机系统表现;最后通过精心设计的外场路测,在复杂环境中验证其实际定位精度与可靠性。文章强调,只有结合可控的实验室验证与多变的外场挑战,才能对接收机性能做出全面、真实的评价。

weixin_28365523的博客 526

HDOJ--2035

人见人爱A^B Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 31125    Accepted Submission(s): 21099 Problem Description 求A^B的最后三位数表示的整数。

社畜のブログ 385

OpenCV图像拼接实战:用SIFT+透视变换打造无缝全景图(附完整代码)

本文详细介绍了使用OpenCV和SIFT算法实现图像拼接的全过程,包括特征匹配、透视变换和高级融合技术。通过实战代码演示,帮助开发者掌握无缝全景图生成的核心技术,适用于旅行摄影、无人机航拍等多种场景。

eee77的博客 1007

求A^B的最后三位数表示的整数

Problem Description 求A^B的最后三位数表示的整数。说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的结束,不做处理。 Output 对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sampl...

1298

【第33话:车辆控制】自动驾驶车辆运动学模型推导及详解

自动驾驶车辆的运动学模型以自行车模型为核心,通过状态方程。

一碗白开水一 837

JA3已死,JA4当立:2026年TLS指纹识别技术深度解析

从JA3到JA4,本质上是TLS指纹技术从"简单粗暴"到"工程化设计"的进化。排序机制解决了浏览器随机化的核心痛点,结构化格式提升了可读性和可运维性,多协议扩展适配了最新的网络环境。2026年的今天,JA4已经从"新技术"变成了"基础设施"。对于安全从业者来说,理解JA4的原理和局限,合理运用到反爬、反欺诈、威胁狩猎场景中,是一项必备的基础技能。但也要清醒认识到,没有任何单一指纹是万能的。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 360

hdoj:2035

#include &lt;iostream&gt; using namespace std; int main() { long a, b; while (cin &gt;&gt; a &gt;&gt; b &amp;&amp; a != 0 &amp;&amp; b != 0) { long result = a; for (lon...

weixin_34405925的博客 234

python常用函数总结

普通函数:进制转换函数、关键字函数、数学函数、字符串函数、列表函数、元组函数、集合函数、字典函数. 栈和队列。 模块函数:math模块、OS模块、IO模块、Datetime模块、time模块、random模块、image模块、sys模块、calendar模块 高阶函数:map、reduce、filter、sorted 排列组合、正则表达式 ...

LDC,公众号【轻松学编程】 4万+

杭电oj HDOJ 2035 人见人爱A^B

杭电oj HDOJ 2035 人见人爱A^B 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=2035 Problem Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0...

qq_39880604的博客 322

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

HDOJ2035 人见人爱A^B

<br />题目:http://acm.hdu.edu.cn/showproblem.php?pid=2035<br /> <br />代码:<br />#include<stdio.h> #include<stdlib.h> int main(){ int a,b,i,p; while(scanf("%d %d",&a,&b)!=EOF){ if(a==0&&b==0){ break; }

计算机专业同学的充电站。 3391

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

HDOJ_2035 人见人爱A^B

Problem Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方”   Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1   Output 对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。   Sample Input 2 3 12 6 6789 10000

free19941004的专栏 320

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

HDOJ 2035 人见人爱A^B (数论)

人见人爱A^B Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17481Accepted Submission(s): 12376 Problem Description 求A^B的最后三位数表示的整数。说明:A^...

aian53516的博客 169

hdoj_2035 人见人爱A^B

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2035   //C++代码 #include using namespace std; int main(){ int a,b; while(cin>>a>>b,a||b){ int ans=1,i; for(i=0;i<b;i++) ans=(ans*a)%1000; cout<

永恒国度 855

HDOJ 2035人见人爱A^B

链接:Problem - 2035 (hdu.edu.cn) 题目大意: 求A的B次方的最后三位数表示的整数 解题思路: 1、可以在每一次取最后三位整数,防止数值过大,爆空间 2、运用递归进行快速幂运算 代码实现: ...

m0_55756918的博客 177

HDOJ-2035 人见人爱A^B

人见人爱A^B 快速幂

傲娇的晓明 371

HDOJ 2035 人见人爱A^B题

/***** HDOJ 2035 人见人爱A^B题 ********/ /******** written by C_Shit_Hu ************/ /****************************************************************************/ /* 今日继续刷水题--杭电2035,人见人爱A^B ...

weixin_30527143的博客 83

Claude Code 2.0 系统提示词优化:从静态指令到动态上下文工程

在AI编程助手领域,系统提示词是引导模型行为的关键技术。其原理是通过预设指令为AI建立初始认知框架,但传统长篇静态提示词在动态开发场景中面临信息过载与上下文冲突的挑战。Claude Code 2.0的技术价值在于重构了上下文理解机制,将重心从静态文本指令转向对项目文件、技能定义和实时操作的动态感知。这种转变要求开发者采用新的上下文工程策略:通过清晰的项目结构、模块化的Skills封装领域知识,并结合精准的临时指令构建即时认知。特别是在Vue 3等前端开发生态中,利用专用Skills替代冗长规范说明,能显著提

weixin_33831196的博客 320

人见人爱A^B hdoj 2035

人见人爱A^B Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 22058    Accepted Submission(s): 15383 Problem Description 求A^B的最后三位数表示的整数。 说明:A

亿念之茶的专栏 394
上一篇: POJ 1995 Raising Modulo Numbers
下一篇: HDOJ 1061 Rightmost Digit
CHRISTINA_ERZA
博客等级 码龄10年 2粉丝 75原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值