As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B.

To make the problem easier, I promise that B will be smaller than 100000.

Is it too hard? No, I work it out in 10 minutes, and my program contains less than 25 lines.

InputThe input contains several test cases. Each test case consists of two positive integers A and B. The length of A will not exceed 1000, and B will be smaller than 100000. Process to the end of file. 
OutputFor each test case, you have to ouput the result of A mod B. 
Sample Input

2 3
12 7
152455856554521 3250

Sample Output

2
5
1521

Big Number HDU - 1212的更多相关文章

  1. 线段树 逆序对 Minimum Inversion Number HDU - 1394 Laptop

    Minimum Inversion Number HDU - 1394 求最小反转数,就是求最少的逆序对. 逆序对怎么求,就是先把所有的数都初始化为0,然后按照顺序放入数字,放入数字前查询从这个数往后 ...

  2. hdu 1212 Big Number

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1212 Big Number Description As we know, Big Number is ...

  3. HDU 1212 Big Number(C++ 大数取模)(java 大数类运用)

    Big Number 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1212 ——每天在线,欢迎留言谈论. 题目大意: 给你两个数 n1,n2.其中n1 ...

  4. HDU 1212 Big Number 大数模小数

    http://acm.hdu.edu.cn/showproblem.php?pid=1212 题目大意: 给你一个长度不超过1000的大数A,还有一个不超过100000的B,让你快速求A % B. 什 ...

  5. hdu 1212 Big Number(大数取模)

    Problem Description As we know, Big Number is always troublesome. But it's really important in our A ...

  6. 题解报告:hdu 1212 Big Number(大数取模+同余定理)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1212 Problem Description As we know, Big Number is al ...

  7. BestCoder13 1001.Beautiful Palindrome Number(hdu 5062) 解题报告

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5062 题目意思:给出 N,找出 1 - 10^N 中满足 Beautiful Palindrome N ...

  8. Minimum Inversion Number~hdu 1394

    The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that ...

  9. ACM-ICPC 2016 大连赛区现场赛 K. Guess the number && HDU 5981(思维+DP)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5981 题意:A在[L, R]之间随机选取一个数X,之后B来猜这个数,如果猜的数比X小,那么A就告诉B猜 ...

随机推荐

  1. Saks就const解释

    In my last column, I discussed one of the reasons why the rules by which a compiler can place data i ...

  2. leetcood学习笔记-202-快乐数

    题目描述: 方法一:比较笨的办法,根据题意,如果变成1返回True,如果出现重复返回False 看到下面有位朋友用的是dict,我用了list,两个都跑了一下似乎list快一点? class Solu ...

  3. [JZOJ 5819] 大逃杀

    题意:求一个树上背包~~ 先贴代码存一下,好像打挂了. #include <bits/stdc++.h> using namespace std; const int maxn = 400 ...

  4. var 更明确地表示一个变量被设置为零值

    创建一个变量并被初始化其为零值,习惯使用关键字var.这种做法是为了更明确地表示一个变量被设置为零值. 如果变量被初始化为某个非零值,就配合结构字面量和短变量操作符来创建变量. 零值 数值类型:0 字 ...

  5. 开发中运行mysql脚本,发现提示mysql提示Column count doesn't match value count at row 1错误

    开发中运行mysql脚本,发现提示mysql提示Column count doesn't match value count at row 1错误, 调试后发现是由于写的SQL语句里列的数目和后面的值 ...

  6. Django中的HttpResponse和JsonResponse

    Django中的HttpResponse和JsonResponse 我们在编写一些借口函数的时候,经常需要给调用者返回json格式的数据,那么如何返回可直接解析的数据呢? 首先第一种方式: from ...

  7. 剑指offer——17数值的整数次方

    题目描述 给定一个double类型的浮点数base和int类型的整数exponent.求base的exponent次方.   保证base和exponent不同时为0   一般解法: 直接相乘: cl ...

  8. 【6折抢】戴尔i7新品Latitude高性能商用本

    致敬拼搏成长中的企业 戴尔5月有钜惠! 买1赠1送同款,单台价格2500元 这波来自戴尔官网的致敬很走心 满足初级办公和高性能运算多重需求 限时折扣火热开抢! 新品  latitude 6折抢! 戴尔 ...

  9. JAVA发展历史!

    前言 自1946年2月14日世界上首款计算机问世,第一代计算机语言“机器语言”便诞生了,它使用的是最原始的穿孔卡片,这种卡片上使用的语言只有专家才能理解,与人类语言差别极大.这种语言本质上是计算机能识 ...

  10. 再次封装ajax函数,统一入口

    根据API写网页的时候,每个页面都需要ajax请求,每次都写一大堆请求,配置什么的太麻烦,于是打算封装一个ajax函数,统一调用: 开始时是使用return返回ajax,如下: function cr ...