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. 2.jeesite增删改查

    一.准备数据 在数据库中中添加一张表和数据,以mysql为例 SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------- ...

  2. 【137】Photoshop相关功能

    1. photoshop中怎样批处理操作 图文教程 来源:http://www.jb51.net/photoshop/57784.html 不知道大家有没有接触过PS里面的批处理呢,当我们要完成数百张 ...

  3. 组件-实体-系统 Entiy-Compoent-System ECS架构整理

    继承体系的问题,为什么要用ECS 面向对象的问题 当一个新的类型需要多个老类型的不同功能的时候,不能很好的继承出来 游戏开发后期会有非常多的类,很难维护 游戏中子系统很多,它们对一个对象的关注点往往互 ...

  4. bzoj 1497 [NOI2006]最大获利【最大权闭合子图+最小割】

    不要被5s时限和50000点数吓倒!大胆网络流!我一个5w级别的dinic只跑了1s+! 看起来没有最大权闭合子图的特征--限制,实际上还是有的. 我们需要把中转站看成负权点,把p看成点权,把客户看成 ...

  5. PHP 循环一个文件下的所有目录以及文件

    function test($dir) { //判断dir是否目录 if(is_dir($dir)) { $files = []; //列出 dir 目录中的文件和目录: $list = scandi ...

  6. NOIp 2017 奶酪 【并查集】 By cellur925

    题目传送门 Orz去年考场上做这道题的我应该还在抱怨没学过空间几何,不一会太困了就开始打瞌睡,然后为了防止睡觉开始在devc++上写默写离骚(逃 思路:如果两个空洞相交,那么把他们并在一个集合里.最后 ...

  7. luogu P1309 瑞士轮【排序】

    题目背景 在双人对决的竞技性比赛,如乒乓球.羽毛球.国际象棋中,最常见的赛制是淘汰赛和循环赛.前者的特点是比赛场数少,每场都紧张刺激,但偶然性较高.后者的特点是较为公平,偶然性较低,但比赛过程往往十分 ...

  8. Python测试工具——nose

    1.nose 特点: a)         自动发现测试用例(包含[Tt]est文件以及文件包中包含test的函数) b)         以test开头的文件 c)         以test开头的 ...

  9. Dexposed:android免Root无侵入Aop框架

    在网上看到了阿里推出的一个android开源项目,名为Dexposed, 是一个Android平台下的无侵入运行期AOP框架.旨在解决像性能监控.在线热补丁等移动开发常见难题,典型使用场景为: AOP ...

  10. EditextText输入类型

    android:inputType="none"--输入普通字符 android:inputType="text"--输入普通字符 android:inputT ...