![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HDU
Rakujitsu
你好!
展开
-
HDU1001 Sum Problem
Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n. Input The input will consist of a series原创 2017-02-02 00:11:55 · 326 阅读 · 0 评论 -
HDU2001 计算两点间的距离
Problem Description 输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。Input 输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。Output 对于每组输入数据,输出一行,结果保留两位小数。Sample Input 0 0 0 1 0 1 1 0Sample Output 1.00原创 2017-02-02 19:58:50 · 151 阅读 · 0 评论 -
HDU2002 计算球体积
Problem Description 根据输入的半径值,计算球的体积。Input 输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。Output 输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数。Sample Input 1 1.5Sample Output 4.189 14.137Hint #define PI 3.1415927原创 2017-02-02 20:00:53 · 199 阅读 · 0 评论 -
HDU2003 求绝对值
Problem Description 求实数的绝对值。Input 输入数据有多组,每组占一行,每行包含一个实数。Output 对于每组输入数据,输出它的绝对值,要求每组数据输出一行,结果保留两位小数。Sample Input 123 -234.00Sample Output 123.00 234.00Author lcy代码 #include<iostre原创 2017-02-02 20:02:21 · 126 阅读 · 0 评论 -
HDU2004 成绩转换
Problem Description 输入一个百分制的成绩t,将其转换成对应的等级,具体转换规则如下: 90~100为A; 80~89为B; 70~79为C; 60~69为D; 0~59为E;Input Output Sample Input Sample Output Author 代码原创 2017-02-02 20:03:45 · 183 阅读 · 0 评论 -
HDU2005 第几天?
Problem Description 给定一个日期,输出这个日期是该年的第几天Input 输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。Output 对于每组输入数据,输出一行,表示该日期是该年的第几天。Sample Input 1985/1/20 2006/3/12Sampl原创 2017-02-02 20:10:16 · 220 阅读 · 0 评论 -
HDU2006 求奇数的乘积
Problem Description 给你n个整数,求他们中所有奇数的乘积。Input 输入数据包含多个测试实例,每个测试实例占一行,每行的第一个数为n,表示本组数据一共有n个,接着是n个整数,你可以假设每组数据必定至少存在一个奇数。Output 输出每组数中的所有奇数的乘积,对于测试实例,输出一行。Sample Input 3 1 2 3 4 2 3 4 5Sample原创 2017-02-02 20:11:47 · 192 阅读 · 0 评论 -
HDU1000 A + B Problem
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 1Sample Output 2Aut原创 2017-02-02 00:07:55 · 179 阅读 · 0 评论 -
HDU2045 不容易系列之(3)—— LELE的RPG难题
Problem Description 人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即”可乐”),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名的RPG难题:有排成一行的n个方格,用红(Red)、粉(Pink)、绿(Green)三色涂每个格子,每格涂一色,要求任何相邻的方格不能同色,且首尾两格也不同色.求全部的原创 2017-02-03 18:39:17 · 195 阅读 · 0 评论 -
HDU2000 ASCII码排序
Problem Description 输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。Input 输入数据有多组,每组占一行,有三个字符组成,之间无空格。Output 对于每组输入数据,输出一行,字符中间用一个空格分开。Sample Input qwe asd zxcSample Output e q w a d s c x zAuthor原创 2017-02-02 19:55:52 · 313 阅读 · 0 评论 -
HDU1998 奇数阶魔方
Problem Description 一个 n 阶方阵的元素是1,2,…,n^2,它的每行,每列和2条对角线上元素的和相等,这样 的方阵叫魔方。n为奇数时我们有1种构造方法,叫做“右上方” ,例如下面给出n=3,5,7时 的魔方. 3 8 1 6 3 5 7 4 9 2 5 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 2原创 2017-02-02 19:54:28 · 345 阅读 · 0 评论 -
HDU1096 A+B for Input-Output Practice (VIII)
Problem Description Your task is to calculate the sum of some integers.Input Input contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M i原创 2017-02-02 16:58:29 · 203 阅读 · 0 评论 -
HDU1002 A + B Problem II
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.Input The first line of the input contains an integer T(1<=T<=20) wh原创 2017-02-02 00:16:56 · 281 阅读 · 0 评论 -
HDU1089 A+B for Input-Output Practice (I)
Problem Description Your task is to Calculate a + b. Too easy?! Of course! I specially designed the problem for acm beginners. You must have found that some problems have the same titles with this原创 2017-02-02 00:20:01 · 265 阅读 · 0 评论 -
HDU1090 A+B for Input-Output Practice (II)
Problem Description Your task is to Calculate a + b.Input Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a s原创 2017-02-02 00:22:38 · 292 阅读 · 0 评论 -
HDU1091 A+B for Input-Output Practice (III)
Problem Description Your task is to Calculate a + b.Input Input contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case contain原创 2017-02-02 00:24:46 · 204 阅读 · 0 评论 -
HDU1092 A+B for Input-Output Practice (IV)
Problem Description Your task is to Calculate the sum of some integersInput Input contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A原创 2017-02-02 00:26:50 · 180 阅读 · 0 评论 -
HDU1093 A+B for Input-Output Practice (V)
Problem Description Your task is to calculate the sum of some integers.Input Input contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M i原创 2017-02-02 16:53:00 · 194 阅读 · 0 评论 -
HDU1094 A+B for Input-Output Practice (VI)
Problem Description Your task is to calculate the sum of some integers.Input Input contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers foll原创 2017-02-02 16:55:16 · 179 阅读 · 0 评论 -
HDU1095 A+B for Input-Output Practice (VII)
Problem Description Your task is to Calculate a + b.Input The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. Output For each p原创 2017-02-02 16:57:06 · 255 阅读 · 0 评论 -
HDU2046 骨牌铺方格
Problem Description 在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数. 例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图: Input 输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0< n<=50)。Output 对于每个测试实例,请输出铺放方案的总数,每个实例的输出占一行。原创 2017-02-03 19:05:29 · 205 阅读 · 0 评论