摘要:
问题描述 输入两个整数a和b,输出这两个整数的和。a和b都不超过100位。 算法描述 由于a和b都比较大,所以不能直接使用语言中的标准数据类型来存储。对于这种问题,一般使用数组来处理。 定义一个数组A,A[0]用于存储a的个位,A[1]用于存储a的十位,依此类推。同样可以用一个数组B来存储b。 计算 阅读全文
posted @ 2020-04-09 22:42
Joelin12
阅读(146)
评论(0)
推荐(0)
摘要:
Problem M: 有多少个0 Time Limit: 1 Sec Memory Limit: 16 MBSubmit: 438 Solved: 57[Submit][Status] Description 求1*2*3*……*n的乘积以多少个0结尾。 Input 输入为多行,至EOF结束。每行为 阅读全文
posted @ 2020-04-09 19:21
Joelin12
阅读(155)
评论(0)
推荐(0)
摘要:
问题描述 输入一个正整数n,输出n!的值。 其中n!=1*2*3*…*n。 算法描述 n!可能很大,而计算机能表示的整数范围有限,需要使用高精度计算的方法。使用一个数组A来表示一个大整数a,A[0]表示a的个位,A[1]表示a的十位,依次类推。 将a乘以一个整数k变为将数组A的每一个元素都乘以k,请 阅读全文
posted @ 2020-04-09 18:54
Joelin12
阅读(514)
评论(0)
推荐(0)
摘要:
You are given n segments on a number line; each endpoint of every segment has integer coordinates. Some segments can degenerate to points. Segments ca 阅读全文
posted @ 2020-04-09 17:17
Joelin12
阅读(123)
评论(0)
推荐(0)
摘要:
In Summer Informatics School, if a student doesn't behave well, teachers make a hole in his badge. And today one of the teachers caught a group of n s 阅读全文
posted @ 2020-04-09 17:11
Joelin12
阅读(214)
评论(0)
推荐(0)
摘要:
You are looking at the floor plan of the Summer Informatics School's new building. You were tasked with SIS logistics, so you really care about travel 阅读全文
posted @ 2020-04-09 17:07
Joelin12
阅读(148)
评论(0)
推荐(0)
摘要:
题目链接:https://vjudge.net/problem/UVA-1225 题意:从1排到n,统计出现数字个数 题解:不要想复杂,直接取余加就可以 极限是1e9,1e10就不可以了,但对1000绰绰有余;用count反而更慢 ac代码 #include<iostream>#include<al 阅读全文
posted @ 2020-04-09 16:56
Joelin12
阅读(121)
评论(0)
推荐(0)
摘要:
链接:https://vjudge.net/problem/UVA-1586 题意:给出一分子化学式,包含C,N,O,H四种元素,求M 题解:这是字符串题。分为几种情况:第一种是一个原子;第二种是多原子:多原子又包括字母与字母相连,字母与数字相连,数字与数字相连。思路就是看前一个原子是字母还是数字 阅读全文
posted @ 2020-04-09 16:26
Joelin12
阅读(221)
评论(0)
推荐(0)
摘要:
There is an objective test result such as \OOXXOXXOOO". An `O' means a correct answer of a problemand an `X' means a wrong answer. The score of each p 阅读全文
posted @ 2020-04-09 15:37
Joelin12
阅读(503)
评论(0)
推荐(0)
浙公网安备 33010602011771号