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 ...
随机推荐
- ChartCtrl源码剖析之——CChartGrid类
CChartGrid类用来绘制波形区域中的表格,当绘制波形时波形就显示在这些表格上面.它处于该控件的区域,如下图所示: CChartGrid类的头文件. #if !defined(AFX_CHARTG ...
- java笔记线程的生命周期图解
- 【css】rem及其替换方案
移动端的web前端开发其实经常会有一些令人头疼的问题,比如屏幕适配.1像素问题等,rem也是之前在屏幕适配上比较完善的一套方案,但是随着业务的深入,任何方案都有其优秀与不足的地方,rem这套方案也一样 ...
- BZOJ2159 Crash的文明世界
Description 传送门 给你一个n个点的树,边权为1. 对于每个点u, 求:\(\sum_{i = 1}^{n} distance(u, i)^{k}\) $ n \leq 50000, k ...
- Kruskal HDOJ 4313 Matrix
题目传送门 题意:如何花最小的代价使得一棵树划分开且不含同类节点 分析:当一条边连接的左右集合同类点小于等于1,那么不用删除,将两个集合合并,要求最小代价,那么贪心思想将权值降序排序,删除后剩下的就是 ...
- magento 添加事件
首先是配置文件config.xml里的配置 <checkout_cart_save_after> /*事件名字*/ <observers> <deal> /*模块名 ...
- Drawable(6)关于StateList的补充
模板: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android=&quo ...
- solr之~模糊查询【转】
solr之~模糊查询 有的时候,我们一开始不可能准确地知道搜索的关键字在 Solr 中查询出的结果是什么,因此,Solr 还提供了几种类型的模糊查询.模糊匹配会在索引中对关键字进行非精确匹配.例如,有 ...
- 5 月编程语言排行榜:Java第一,R跌出Top20
我们都知道,最近,TIOBE 发布了 5 月份编程语言排行榜.其中,前三名依然健稳不变,他们分别是 Java.C.C++,第四则为: Python ,第五则为 VB .NET. 下面两张图,我们可以看 ...
- vue--组件中的自定义事件
父组件通过props向子组件传递数据,子组件通过自定义事件向父组件传递信息. 在子组件中通过$emit触发事件,父组件在直接使用子组件的地方使用v-on(即@)来监听子组件触发的事件. 举例:(不知道 ...