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. bzoj 2178 圆的面积并【simpson积分】

    直接套simpson,f可以直接把圆排序后扫一遍所有圆,这样维护一个区间就可以避免空段. 然而一定要去掉被其他圆完全覆盖的圆,否则会TLE #include<iostream> #incl ...

  2. 版本管理工具 Git

    Git是目前世界上最先进的分布式版本控制系统(没有之一). 文章参考来源: https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248 ...

  3. 第四章 朴素贝叶斯法(naive_Bayes)

    总结 朴素贝叶斯法实质上是概率估计. 由于加上了输入变量的各个参量条件独立性的强假设,使得条件分布中的参数大大减少.同时准确率也降低. 概率论上比较反直觉的一个问题:三门问题:由于主持人已经限定了他打 ...

  4. iOS Debug心得 (持续更新)

    最近在维护一个内部比较混乱的APP,Debug的时候遇到很多比较痛苦的地方, 因此做一个Debug记录,对以后的开发会有比较大的帮助: 这样,在开发新项目的时候就可以争取把一些BUG扼杀在襁褓中. & ...

  5. 尺取法 POJ 3320 Jessica's Reading Problem

    题目传送门 /* 尺取法:先求出不同知识点的总个数tot,然后以获得知识点的个数作为界限, 更新最小值 */ #include <cstdio> #include <cmath> ...

  6. Ghost系统操作记录

    1.下载Symantec Ghost应用. 2.下载老毛桃PE工具箱. 3.利用老毛桃PE工具箱制作启动U盘. 4.拷贝Ghost应用至U盘. 5.设置计算机启动顺序为U盘启动. 6.重启计算机进入P ...

  7. 【先定一个小目标】dotnet core 命令详解

    本篇博客来了解一下dotnet这个神奇的命令.我会依次对dotnet,dotnet new,dotnet restore,dotnet build,dotnet test,dotnet run,dot ...

  8. css超出部分显示省略号

    单行文本 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF- ...

  9. 多功能Markdown编辑器MarkdownPad 2的下载、安装和初步使用步骤(图文详解)(博主推荐)

    不多说,直接上干货!   MarkdownPad 是什么? 一.MarkdownPad 2的下载 http://markdownpad.com/download/markdownpad2-setup. ...

  10. Codeforces Beta Round #98 (Div. 2)(A-E)

    A #include <iostream> #include<cstdio> #include<cstring> #include<algorithm> ...