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的更多相关文章

  1. u3d avatar部件的理解

    u3d中带动画的fbx文件导入的时候,就会显示一个avatar组件,这个到底干嘛的一直没能很好的理解,翻看网上的介绍,基本都是告诉你,设置humanoid类型动画时,拖拉过去之类,但是这玩意到底存储了 ...

  2. UMA - Unity Multipurpose Avatar

    UMA - Unity Multipurpose Avatar UMA version 1.0.1.0R Unity 4.3 What is UMA? UMA - Unity Multipurpose ...

  3. Unity之Avatar原理

    今天花了一些时间理了理Unity的动画系统. 之前给不同模型配动画时没怎么在意,只知道用Avatar可以让一个模型使用另一个模型的动画.由于用的基本上都是人物模型,基本上没出现什么错误. 不过在用到异 ...

  4. [Unity动画]04.Avatar Mask

    参考链接: https://www.cnblogs.com/hammerc/p/4832637.html Avatar Mask主要用于动画层融合.例如说,边跑边举起东西,这个实际上就是下半身播放跑步 ...

  5. Avatar

    [Avatar] 1.Retargeting of Humanoid animations Retargeting is only possible for humanoid models, wher ...

  6. 【angular5项目积累总结】avatar组件

    View Code import { Component, HostListener, ElementRef } from '@angular/core'; import { Adal4Service ...

  7. Unity导入模型出现 (Avatar Rig Configuration mis-match. Bone length in configuration does not match position in animation)?

    昨天遇到这两个模型导入的问题,查了一下资料,自己摸索了一下解决方法..总结一下~ 出现的原因:(问题1)Warning 当模型文件导入以后并且设置Animation Type是Generic的时候,动 ...

  8. Unity---动画系统学习(6)---Avatar Mask动画融合、Layers动画分层、IK反向动力学

    1. 介绍 Avatar Mask(动画融合) 前面我们一直介绍的都是动画混合,一般用于解决边跑边转弯的问题.而动画融合一般用于解决例如边跑边挥手的问题. 简单说就是让跑步去控制腿的骨骼,挥手控制手的 ...

  9. J-CUBE Appears at AVATAR Xprize at Geneva 2019

    2019年5月27日,瑞士日内瓦,Avatar Xprize发布会隆重举行.非常荣幸的是,J-CUBE也受邀参加此次大会. 关于Avatar Xprize项目的介绍 https://avatar.xp ...

随机推荐

  1. angular中transclude的理解

    今天被这个transclude搞糊涂了,弄了半天,才知道原来使用起来很简单.很烦恼为社么书中的对于这个的介绍这么晦涩难懂.直到看到了这篇文章,才让我弄清楚了. 一.transclude介绍 trans ...

  2. linux下系统调用劫持ioctl

    实验环境:linux 2.6.32   64位系统 采用lkm(动态加载内核模块)方式劫持ioctl系统调用,系统调用过程如图所示(以open为例子) 实验代码:(头文件有不需要的,但是懒得改了,在系 ...

  3. SAS基础 -- SAS编程入门

    SAS语言 -- 简介   SAS语言是一种专用的数据管理与分析语言,它提供了一种完善的编程语言.类似于计算机的高级语言,SAS用户只需要熟悉其命令.语句及简单的语法规则就可以做数据管理和分析处理工作 ...

  4. bzoj 1042: [HAOI2008]硬币购物【容斥原理+dp】

    当然是容斥啦. 用dp预处理出\( f[i] \),表示在\( i \)价格时不考虑限制的方案数,转移方程是\( f[i]+=f[i-c[j]] \),用状压枚举不满足的状态容斥一下即可. #incl ...

  5. (6)css盒子模型(基础下)

    一.理解多个盒子模型之间的相互关系 现在大部分的网页都是很复杂的,原因是一个“给人用的”网页中是可能存在着大量的盒子,并且它们以各种关系相互影响着. html与DOM的关系 详情了解“DOM” :ht ...

  6. C# 后台处理http请求

    using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using Syst ...

  7. 《开源自主OdooERP部署架构指南》试读:第二章数据库服务构建

    文/开源智造联合创始人老杨 本文来自<开源自主OdooERP部署架构指南>的试读章节.书籍尚未出版,请勿转载.欢迎您反馈阅读意见. 使用apt.postgresql.org 您可以选择使用 ...

  8. spring进行事务管理

    一:spring使用注解的方式进行事务声明 1.spring的声明式事务: 用jdbc的事务管理器:DataSourceTransactionManager 首先在applicationContext ...

  9. python_os.path模块用法

    python中os.path模块用法: dirname()  用于去掉文件名,返回目录所在的路径 >>> import os >>> os.path.dirname ...

  10. 四大开源协议比较:BSD、Apache、GPL、LGPL【转载】

    四大开源协议原文链接 本文参考文献:http://www.fsf.org/licensing/licenses/ 现今存在的开源协议很多,而经过Open Source Initiative组织通过批准 ...