
zcmu
三井寿迷弟
菜鸡一个
展开
-
zcmu 1007
【代码】zcmu 1007。原创 2022-12-19 17:36:17 · 195 阅读 · 1 评论 -
zcmu1011
DescriptionOne hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales showed w kilos. They rushed home, dying of thirst, and原创 2021-08-17 12:25:25 · 519 阅读 · 0 评论 -
zcmu1000
题目DescriptionYour task is to Calculate the sum of some integers.InputInput contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A test case starting with 0 terminates the input and this test ca原创 2021-01-28 18:19:47 · 334 阅读 · 0 评论 -
zcmu1001
题目DescriptionCalculate A+BInputThe input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.OutputFor each pair of input integers a and b you should output the sum of a and b in one line,and with原创 2021-01-28 18:23:12 · 322 阅读 · 0 评论 -
zcmu1003: ZCMU_A+B (V)
Description你的任务是计算一些整数的和。Input第一行输入一个整数T,表示T组测试数据对于每组测试数据,先输入一个整数N,表示整数的个数,然后输入N个整数a1,a2,…,aNOutput对于每组测试数据,你的任务是求出a1,a2,…,aN的和,输出占一行Sample Input24 1 2 3 45 1 2 3 4 5Sample Output1015#include<stdio.h>int main(){ int i,a,sum,r;原创 2021-08-11 21:06:50 · 738 阅读 · 0 评论 -
zcmu 1004: code A + B
DescriptionYou can solve this problem as easy as A+BYou just output the following content#include <stdio.h>int main(){int a,b;while(scanf("%d%d",&a,&b) != EOF) printf("%d\n",a+b);return 0;}Inputno inputOutputSee Scample O原创 2021-08-11 21:09:46 · 439 阅读 · 0 评论 -
zcmu1005: Theatre Square
DescriptionTheatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city’s anniversary, a decision was taken to pave the Square with square granite flagstones. Each flagstone is of the size a原创 2021-08-11 21:24:31 · 325 阅读 · 0 评论 -
zcmu1006: Even Number ?
DescriptionMr620 likes even number very much. Now give you n numbers. Please tell Mr620 whether the number is even or not.InputThe first line contains a integer n(0<n<=1000);Then next n lines, every line contains a integer x.OutputIf x is even原创 2021-08-11 21:28:15 · 316 阅读 · 0 评论 -
zcmu 1009: Patties
DescriptionPetya is well-known with his famous cabbage patties. Petya’s birthday will come very soon, and he wants to invite as many guests as possible. But the boy wants everybody to try his specialty of the house. That’s why he needs to know the number原创 2021-08-11 21:34:29 · 426 阅读 · 0 评论 -
zcmu1010: Drawing Lines
DescriptionLittle Johnny likes to draw a lot. A few days ago he painted lots of straight lines on his sheet of paper. Then he counted in how many zones the sheet of paper was split by these lines. He noticed that this number is not always the same. For in原创 2021-08-11 21:59:48 · 451 阅读 · 2 评论 -
zcmu1061: 求两个数的和与差
1061: 求两个数的和与差Description输入整数 a 和b,计算并输出a、b 的和与差。Input输入只有一组a和bOutput按照下面的例子输出结果Sample Input2 -8Sample OutputThe sum is -6The difference is 10代码#include<stdio.h>int main(){ int a,b; scanf("%d%d",&a,&b);/*输入a,b*/ /*输出*/ prin原创 2020-11-23 20:25:32 · 357 阅读 · 0 评论 -
zcmu1062:求平方根
标题1062:求平方根Description输入 1 个实数x,计算并输出其平方根(保留1 位小数)Input输入一个实数xOutput输出平方根Sample Input17Sample OutputThe square root of 17.0 is 4.1代码#include<stdio.h>#include<math.h>/*数学函数*/int main(){ float x,y; scanf("%f",&x); y=sqrt(原创 2020-11-23 20:33:40 · 627 阅读 · 0 评论 -
zcmu1063: 华氏温度转换为摄氏温度
1063: 华氏温度转换为摄氏温度Description输入华氏温度f,计算并输出相应的摄氏温度c(保留2 位小数)。c = 5/9(f-32).Input输入一个实数x表示华氏温度Output输出对应的摄氏温度Sample Input17.2Sample OutputThe temprature is -8.22代码#include<stdio.h>int main(){ float f,c; scanf("%f",&f); c=5.0*(f-32)/原创 2020-11-23 20:49:45 · 319 阅读 · 0 评论 -
zcmu1064: 计算旅途时间
1064: 计算旅途时间Description输入 2 个整数time1 和time2,表示火车的出发时间和到达时间,计算并输出旅途时间。有效的时间范围是 0000 到2359,不需要考虑出发时间晚于到达时间的情况。Input输入只有两个整数Output求出火车的旅途时间Sample Input712 1411Sample OutputThe train journey time is 6 hrs 59 mins.代码#include<stdio.h>int main原创 2020-11-23 20:53:02 · 2178 阅读 · 1 评论 -
zcmu1066: 大写字母转换成小写字母
1066: 大写字母转换成小写字母Description输入一个大写英文字母,输出相应的小写字母。Input输入一个大写英文字母Output输出对应的小写字母Sample InputKSample Outputk代码#include<stdio.h>int main(){ char x,y; scanf("%c",&x); y=x+32;/*ASCII码加减*/ printf("%c",y); return 0;}...原创 2020-11-23 21:15:13 · 295 阅读 · 0 评论 -
zcmu1067: 显示两级成绩
1067: 显示两级成绩Description输入一个正整数 repeat (0<repeat<10),做repeat 次下列运算:输入一个学生的数学成绩,如果它低于 60,输出“Fail”,否则,输出“Pass”。Input见SampleOutput见SampleSample Input260 59Sample OutputPassFail代码#include<stdio.h>int main(){ int i,r,x; scanf("%d",原创 2020-11-23 21:27:50 · 1082 阅读 · 0 评论 -
zcmu1068: 找最小值
1068: 找最小值Description输入一个正整数 repeat (0<repeat<10),做repeat 次下列运算:输入四个整数,输出其中的最小值。Input见SampleOutput见SampleSample Input312 6 1 9010 40 30 20-1 -3 -4 -5Sample Outputmin is 1min is 10min is -5代码#include<stdio.h>int main(){ int原创 2020-11-23 22:40:32 · 560 阅读 · 0 评论 -
zcmu1072: 显示水果的价格
1072: 显示水果的价格Description输入一个正整数 repeat (0<repeat<10),做repeat 次下列运算:以下 4 种水果的单价分别是3.00 元/公斤,2.50 元/公斤,4.10 元/公斤,10.20 元/公斤。[1] apples[2] pears[3] oranges[4] grapes输入水果的编号,输出该水果的单价(保留2 位小数)。如果输入不正确的编号,显示单价为0.00。Input见sampleOutput见sampleSam原创 2020-11-23 22:48:48 · 1304 阅读 · 0 评论 -
zcmu1074: 求1+1/2+1/3+...+1/n
1074: 求1+1/2+1/3+…+1/nDescription输入一个正整数 repeat (0<repeat<10),做repeat 次下列运算:读入 1 个正整数 n(n<=50),计算并输出1+1/2+1/3+…+1/n (保留3 位小数)。Input见sampleOutput见sampleSample Input2210Sample Output1.5002.929代码在这里插入代码片...原创 2020-11-24 20:43:54 · 1077 阅读 · 0 评论 -
zcum1075: 求n!
1075: 求n!Description输入一个正整数 repeat (0<repeat<10),做repeat 次下列运算:读入 1 个正整数 n (n<=22),计算并输出 n! 。Input见sampleOutput见sampleSample Input31105Sample Output13628800120代码#include<stdio.h>double fact(int n);int main(){ int i,r,n;原创 2020-11-25 23:01:14 · 531 阅读 · 0 评论