CSU1018: Avatar
1018: Avatar
Submit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 841 Solved: 557
Description
In the planet Pandora, Jake found an old encryption algorithm. The plaintext, key and ciphertext are all four decimal numbers and all greater than 0. The way to get the ciphertext from the plaintext and the key is very simple: the ciphertext is the last four digits of the product of the plaintext and the key (for example: the plaintext is 2010 and the key is 4024, and then the product is 8088240. So the ciphertext is 8240).
Note that the plaintext and the key don’t have leading 0, while the ciphertext might have. Now given the plaintext and the key, you are asked to figure out the ciphertext for Jake quickly.
Input
The first line is an integer T, which presents the number of test cases. Then there are T lines, each line has two integers, the first integer is the plaintext and the second is the key.
Output
For each test case, output the ciphertext.
Sample Input
2
2010 4024
1234 1111
Sample Output
8240
0974 题意:水题,给两个数求相乘后的结果的后四位,直接乘,然后把数记录到数组中,然后输出即可。
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
const int maxn=;
int T;
int a,b;
int ans[maxn];
int main()
{
scanf("%d",&T);
while(T--)
{
scanf("%d %d",&a,&b);
int temp=a*b;
for(int i=;i<;i++)
{
ans[i]=temp%;
temp/=;
}
for(int i=;i>=;i--)
printf("%d",ans[i]);
printf("\n");
}
return ;
} /**********************************************************************
Problem: 1018
User: therang
Language: C++
Result: AC
Time:0 ms
Memory:2024 kb
**********************************************************************/
CSU1018: Avatar的更多相关文章
- u3d avatar部件的理解
		u3d中带动画的fbx文件导入的时候,就会显示一个avatar组件,这个到底干嘛的一直没能很好的理解,翻看网上的介绍,基本都是告诉你,设置humanoid类型动画时,拖拉过去之类,但是这玩意到底存储了 ... 
- UMA - Unity Multipurpose Avatar
		UMA - Unity Multipurpose Avatar UMA version 1.0.1.0R Unity 4.3 What is UMA? UMA - Unity Multipurpose ... 
- Unity之Avatar原理
		今天花了一些时间理了理Unity的动画系统. 之前给不同模型配动画时没怎么在意,只知道用Avatar可以让一个模型使用另一个模型的动画.由于用的基本上都是人物模型,基本上没出现什么错误. 不过在用到异 ... 
- [Unity动画]04.Avatar Mask
		参考链接: https://www.cnblogs.com/hammerc/p/4832637.html Avatar Mask主要用于动画层融合.例如说,边跑边举起东西,这个实际上就是下半身播放跑步 ... 
- Avatar
		[Avatar] 1.Retargeting of Humanoid animations Retargeting is only possible for humanoid models, wher ... 
- 【angular5项目积累总结】avatar组件
		View Code import { Component, HostListener, ElementRef } from '@angular/core'; import { Adal4Service ... 
- Unity导入模型出现 (Avatar Rig Configuration mis-match. Bone length in configuration does not match position in animation)?
		昨天遇到这两个模型导入的问题,查了一下资料,自己摸索了一下解决方法..总结一下~ 出现的原因:(问题1)Warning 当模型文件导入以后并且设置Animation Type是Generic的时候,动 ... 
- Unity---动画系统学习(6)---Avatar Mask动画融合、Layers动画分层、IK反向动力学
		1. 介绍 Avatar Mask(动画融合) 前面我们一直介绍的都是动画混合,一般用于解决边跑边转弯的问题.而动画融合一般用于解决例如边跑边挥手的问题. 简单说就是让跑步去控制腿的骨骼,挥手控制手的 ... 
- J-CUBE Appears at AVATAR Xprize at Geneva 2019
		2019年5月27日,瑞士日内瓦,Avatar Xprize发布会隆重举行.非常荣幸的是,J-CUBE也受邀参加此次大会. 关于Avatar Xprize项目的介绍 https://avatar.xp ... 
随机推荐
- 警告框在asp.net mvc中应用
			Bootstrap与asp.net MVC框架结合,产生警告框.主要是利用控制器的TempData 字典对象 生成临时数据. ASP.NET MVC的TempData用于传输一些临时的数据,例如在各个 ... 
- wincap的安装与环境配置
			首先开始知道什么是wincap? 1 通常情况下,大多数的网络应用程序都是通过操作系统来访问网络(sockets),这样是算比较简单的了,毕竟已经封装好了 ,有的时候呢需要一些底层的细节比如协议处理, ... 
- 使用 dynamic 标记解析JSON字符串(转)
			http://www.cnblogs.com/taotaodetuer/p/4171327.html string jsonStr = "{\"data\": {\&qu ... 
- (转)Sql Server 保留几位小数的两种做法
			原文地址:http://blog.csdn.net/skyandcode/article/details/23523815 问题: 数据库里的 float momey 类型,都会精确到多位小数.但有时 ... 
- Oracle:ORA-12154: TNS:could not resolve the connect identifier specified
			ORA-12154: TNS: 无法解析指定的连接标识符 注册表:regedit 安装oracle后用Net Manager 配置好服务名称之后,测试成功,可是PL/SQL无法连接 http://we ... 
- bzoj 3930: [CQOI2015]选数【递推】
			妙啊 这个题一上来就想的是莫比乌斯反演: \[ f(d)=\sum_{k=1}^{\left \lceil \frac{r}{d} \right \rceil}\mu(k)(\left \lceil ... 
- iOS SDK更新换代的功能
			wantsFullScreenLayout已经作废了,取而代之是 1.edgesForExtendedLayout 这个属性是UIExtendedEdge类型,用来制定视图的哪条边需要扩展.比如UIR ... 
- Qt对象模型之一:信号和槽
			一.信号和槽机制概述 信号槽是 Qt 框架引以为豪的机制之一.所谓信号槽,实际就是观察者模式.当某个事件发生之后,比如,按钮检测到自己被点击了一下,它就会发出一个信号(signal).这种发出是没有目 ... 
- 题解报告:poj 2185  Milking Grid(二维kmp)
			Description Every morning when they are milked, the Farmer John's cows form a rectangular grid that ... 
- rhel7安装oracle 11gR2
			一.修改操作系统核心参数 在Root用户下执行以下步骤: 1)修改用户的SHELL的限制,修改/etc/security/limits.conf文件 输入命令:vi /etc/security/lim ... 
