HDOJ-1000 A + B Problem

# include <stdio.h>

int main()

{

__int64 a, b;

while(scanf("%I64d %I64d",&a, &b) != EOF)

printf("%I64d\n",a + b);

return 0;

}

时间: 2024-10-12 16:01:14

HDOJ-1000 A + B Problem的相关文章

HDOJ 1002 A + B Problem II (Big Numbers Addition)

题目链接在此?http://acm.hdu.edu.cn/showproblem.php?pid=1002 这题也比较简单,只需要开三个长度为1000的char数组来分别储存a.b.ans,再利用我们加法的算法,先向右对齐再相加.注意一下进位时的特殊情况就好了. 不过笔者的代码写好后提交上去,两次Presentation Error,然后才发现只是最后多输出一个空行的问题  =.= Orz /**  * HDOJ 1002 A + B Problem II  * Big Numbers Addi

1000: A+B Problem(NetWork Flow)

1000: A+B Problem Time Limit: 1 Sec  Memory Limit: 5 MBSubmit: 11814  Solved: 7318[Submit][Status][Discuss] Description Calculate a+b Input Two integer a,b (0<=a,b<=10) Output Output a+b Sample Input 1 2 Sample Output 3 HINT Q: Where are the input a

HDOJ 5371 Hotaru&#39;s problem manacher+优先队列+二分

先用求回文串的Manacher算法,求出以第i个点和第i+1个点为中心的回文串长度,记录到数组c中 比如 10 9 8 8 9 10 10 9 8 我们通过运行Manacher求出第i个点和第i+1个点为中心的回文串长度 0 0 6 0 0 6 0 0 0 两个8为中心,10 9 8 8 9 10是个回文串,长度是6. 两个10为中心,8 9 10 10 9 8是个回文串,长度是6. 要满足题目所要求的内容,需要使得两个相邻的回文串,共享中间的一部分,比如上边的两个字符串,共享 8 9 10这一

hdoj 5371 Hotaru&#39;s problem

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5371 这道题用到了Manacher算法,首先简单介绍一下Manacher算法: ---------------------------------------------------------------------------------------------- [转]http://blog.csdn.net/yzl_rex/article/details/7908259 一个专门针对回文子串

hdoj 1016 Prime Ring Problem 【DFS】

策略如题 链接 http://acm.hdu.edu.cn/showproblem.php?pid=1016 代码: #include<stdio.h> #include<string.h> int prime[25] = {1, 1}, n, vis[25]; //vis作用:标记是否用过 int a[25]; void f() //找出来前20的素数 判定为0 { for(int i = 2; i <= 24; i ++){ if(prime[i] == 0) for(i

HDU 1000 A + B Problem(指针版)

A + B Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 654986    Accepted Submission(s): 204210 Problem Description Calculate A + B. Input Each line will contain two integers A and B. Pr

HDOJ 3666 THE MATRIX PROBLEM 差分约束

根据题意有乘除的关系,为了方便构图,用对数转化乘除关系为加减关系..... THE MATRIX PROBLEM Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7486    Accepted Submission(s): 1914 Problem Description You have been given a matrix CN

hdoj 1002 A + B Problem II

A + B Problem II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 242959    Accepted Submission(s): 46863 Problem Description I have a very simple problem for you. Given two integers A and B, you

HDU 1000 A+B Problem C/C++

Problem Description Calculate A + B. Input Each line will contain two integers A and B. Process to end of file. Output For each case, output A + B in one line. Sample Input 1 1 Sample Output 2 Author HDOJ C++: 1 int main() { 2 3 int a, b; 4 5 while (

hdoj 1002 A + B Problem II【大数加法】

A + B Problem II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 260585    Accepted Submission(s): 50389 Problem Description I have a very simple problem for you. Given two integers A and B, you