- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 Bash Shell 命令练习
1 2 3 4 5 6 7 8 9 a v 你好 . /8 求以上字符串中所有数字之和echo $[`cat test1 | tr -s -c "1234567890" " " | tr " " "+"` 0]echo “ABCefg” >> test2 将字符串中的所有小写变大写cat test2 | tr "ABCDEFG" “abcdefg"找到PATH 变量中的最
2018-05-25 13:17:19 608
原创 Problem 13 : Large sum
Problem 13Large sumWork out the first ten digits of the sum of the following one-hundred 50-digit numbers.3710728753390210279879799822083759024651013574025046376937677490009712648124896970078050417018...
2018-05-19 16:13:08 340
原创 Problem 12 : Highly divisible triangular number
Problem 12Highly divisible triangular numberThe sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first t...
2018-05-19 16:07:20 302
原创 花式玩转线性筛(线性筛法 + 算术基本定理)
利用(线性筛法O(n) + 算数基本定理) 基本上可以解决所有因子问题。本文提供的方法:1.计算任意数字的最小素因子2.计算任意数字的最大素因子3.计算任意数字的素因子种类数量4.计算任意数字的素因子个数5.计算任意数字的因子和1.计算任意数字的最小质因子#include <stdio.h>#define MAX_N 1000000#define MIN(a,b) (a) >...
2018-05-08 21:38:25 727
原创 等比数列求和公式的推导
==>==> 因为 所以 你可能机智发现为什么我的是n+1次幂,这和传统的求和公式不太一样,毕竟我们程序员是从0开始计数的((lll¬ω¬))...
2018-05-01 21:04:00 13099
原创 Problem 11 : Largest product in a grid
Problem 11Largest product in a gridIn the 20×20 grid below, four numbers along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 0849 49 99 40 17 81 18 5...
2018-05-01 19:28:52 405
原创 Problem 10 :Summation of primes
Problem 10Summation of primesThe sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.素数的和所有小于10的素数的和是2 + 3 + 5 + 7 = 17。求所有小于两百万的素数的和。题目解答朴素解法:暴力枚举优化算法:素数...
2018-05-01 19:24:04 218
公交查询系统的数据库设计
2018-01-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人