https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=996

解题思路:求两个数差值的绝对值,注意用long;

 #include<iostream>
using namespace std; int main()
{
long a,b;
while(cin>>a>>b)
{
if(b>a)
cout<<b-a<<endl;
else
cout<<a-b<<endl;
}
return ;
}

UVa 10055 - Hashmat the Brave Warrior的更多相关文章

  1. 10055 - Hashmat the Brave Warrior & 各数据类型所占字节数 (C语言)

    Problem A Hashmat the brave warrior Input: standard input Output: standard output Hashmat is a brave ...

  2. 10055 - Hashmat the Brave Warrior

    Problem A Hashmat the brave warrior Input: standard input Output: standard output Hashmat is a brave ...

  3. Hashmat the brave warrior(UVa10055)简单题

    Problem A Hashmat the brave warrior Input: standard input Output: standard output Hashmat is a brave ...

  4. Hashmat the brave warrior - UVa10055

    欢迎访问我的新博客:http://www.milkcu.com/blog/ 原文地址:http://www.milkcu.com/blog/archives/uva10055.html 题目描述 Pr ...

  5. UVA_10055:Hashmat the brave warrior

    Language:C++ 4.8.2 #include<stdio.h> int main(void) { long long int a, b; while(scanf("%l ...

  6. UVa 10055

    说一下犯错的地方: 1)没有注意数据范围,题目中是The input numbers are not greater than balabalabala. 而这个32位的int类型恰好装不下2^32, ...

  7. 【索引】Volume 0. Getting Started

    AOAPC I: Beginning Algorithm Contests (Rujia Liu) Volume 0. Getting Started 10055 - Hashmat the Brav ...

  8. UVA题目分类

    题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics ...

  9. Zerojudge解题经验交流

    题号:a001: 哈囉 背景知识:输出语句,while not eof 题号:a002: 簡易加法 背景知识:输出语句,while not eof,加法运算 题号:a003: 兩光法師占卜術 背景知识 ...

随机推荐

  1. 数论 UVA 11076

    这道题目的意思简单易懂说的是给你n个数(可能有重复相同的数字),列出他们所有排列的情况,再逐位相加,求出和,例如:给你1,2,3,则排列的情况为<123>, <132>, &l ...

  2. 《C与指针》第七章练习

    本章问题 1.具有空函数体的函数可以作为存根使用,你如何对这类函数进行修改,使其更有用? answer:Have the stub(存根) print out a message when it is ...

  3. 类似title的鼠标跟随事件

    $(document).ready(function(){ // 创建一个div显示提示信息 var dropTitle = document.createElement("div" ...

  4. hihoCoder-1036 (AC自动机模板题)

    题目大意:判断模式串中是否出现模板. 代码如下: # include<iostream> # include<cstdio> # include<queue> # ...

  5. VSCode用户设置

    // 将设置放入此文件中以覆盖默认设置 { //-------- 搜索配置 -------- "search.exclude": { "**/node_modules&q ...

  6. TestDisk 恢复rm -rf 的文件

    Linux操作系统下使用TestDisk恢复已删除的文件或目录 原创作者:szyzln/2015.10.16   转载需注明原始出处! 说明: testdisk和photorec是著名的恢复数据,而绝 ...

  7. cookie,session,sessionid

    cookie,session,sessionid http协议是无状态的,意思是每次请求的状态不会保存.因此,产生了cookie,session之类保存会话状态的机制.1.什么是cookiecooki ...

  8. C语言 gets()和scanf()函数的区别

    scanf( )函数和gets( )函数都可用于输入字符串,但在功能上有区别.若想从键盘上输入字符串"hi hello",则应该使用 gets 函数. gets可以接收空格:而sc ...

  9. 【C】 02 - 程序结构和预处理

    在正式进入C的语法之前,有必要对其整体外观和组成元素作一个浏览.这部分内容对大多数人是比较陌生的,但它们却是C的起点和骨架.而这些内容涉及的背景或细节又可以展开为专门的课题,这里也只是浅尝则止,说明个 ...

  10. libcurl发起post请求时间延迟问题。except为空即可

    最近在做团购酒店APP分享到qzone功能,使用libcurl访问qzone的分享cgi接口,酒店分享信息以POST方式传输,在测试的时候发现分享接口平均有2s的延迟,这延迟也太大了吧,于是乎问了空间 ...