oracle数据库求回文数,Euler Project 挨个做 - 之一(Q1-50)

Euler Project 问题链接:

http://projecteuler.net/index.php?section=problems&page=1

准备挨个自己独立思考做一遍。

做题限于在Oracle数据库范围内, 优先顺序: 普通SQL -> 递归SQL -> PL/SQL -> Java -> 借助物理表

做的过程中,除了结果外,会把思路讲出来。

碰到及其难的,先跳过。

解题汇总:

Q1 Add all the natural numbers below one thousand that are multiples of 3 or 5.   #2

Q2 Find the sum of all the even-valued terms in the Fibonacci sequence which do not exceed four million.  #3

Q3 Find the largest prime factor of a composite number.    #4

Q4 Find the largest palindrome made from the product of two 3-digit numbers. #5

Q5 What is the smallest number divisible by each of the numbers 1 to 20?       #14

Q6 What is the difference between the sum of the squares and the square of the sums?  #16

Q7 Find the 10001st prime.    #17

Q8 Discover the largest product of five consecutive digits in the 1000-digit number.  #21

Q9 Find the only Pythagorean triplet, {a, b, c}, for which a + b + c = 1000.  #24

Q10 Calculate the sum of all the primes below two million. #26

Q11 What is the greatest product of four numbers on the same straight line in the 20 by 20 grid? #31

Q12 What is the value of the first triangle number to have over five hundred divisors? #32

Q13 Find the first ten digits of the sum of one-hundred 50-digit numbers.  #43

Q14 Find the longest sequence using a starting number under one million. #44

Q15 Starting in the top left corner in a 20 by 20 grid, how many routes are there to the bottom right corner?  #67

Q16 What is the sum of the digits of the number 2^1000?  #81

Q17 How many letters would be needed to write all the numbers in words from 1 to 1000?  #82

Q18 Find the maximum sum travelling from the top of the triangle to the base.  #92

Q19 How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?  #96

Q20 Find the sum of digits in 100! #97

Q21 Evaluate the sum of all the amicable numbers under 10000. #98

Q22 What is the total of all the name scores in the file of first names? #108

Q23 Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers. #112

Q24 What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9? #116

Q25 What is the first term in the Fibonacci sequence to contain 1000 digits?  #121

Q26 Find the value of d < 1000 for which 1/d contains the longest recurring cycle. #123

Q27 Find a quadratic formula that produces the maximum number of primes for consecutive values of n. #130

Q28 What is the sum of both diagonals in a 1001 by 1001 spiral? #138

Q29 How many distinct terms are in the sequence generated by ab for 2 ≤ a ≤ 100 and 2 ≤ b ≤ 100? #140

Q30 Find the sum of all the numbers that can be written as the sum of fifth powers of their digits. #143

Q31 Investigating combinations of English currency denominations. #147

Q32 Find the sum of all numbers that can be written as pandigital products. #161

Q33 Discover all the fractions with an unorthodox cancelling method. #164

Q34  Find the sum of all numbers which are equal to the sum of the factorial of their digits. #166

Q35 How many circular primes are there below one million? #169

Q36 Find the sum of all numbers less than one million, which are palindromic in base 10 and base 2. #177

Q37 Find the sum of all eleven primes that are both truncatable from left to right and right to left. #192

Q38 What is the largest 1 to 9 pandigital that can be formed by multiplying a fixed number by 1, 2, 3, ... ? #200

Q39 If p is the perimeter of a right angle triangle, {a, b, c}, which value, for p ≤ 1000, has the most solutions? #204

Q40 Finding the nth digit of the fractional part of the irrational number. #205

Q41 What is the largest n-digit pandigital prime that exists?  #209

Q42 How many triangle words does the list of common English words contain? #221

Q43 Find the sum of all pandigital numbers with an unusual sub-string divisibility property. #224

Q44 Find the smallest pair of pentagonal numbers whose sum and difference is pentagonal. #229

Q45  After 40755, what is the next triangle number that is also pentagonal and hexagonal? #236

Q46 What is the smallest odd composite that cannot be written as the sum of a prime and twice a square? #240

Q47  Find the first four consecutive integers to have four distinct primes factors. #249

Q48  Find the last ten digits of 11 + 22 + ... + 10001000.  #255

Q49 Find arithmetic sequences, made of prime terms, whose four digits are permutations of each other.  #260

Q50 Which prime, below one-million, can be written as the sum of the most consecutive primes?  #262

Q51-?  Euler Project 挨个做- 之二 (Q51-?)

[本帖最后由 tree_new_bee 于 2011-1-3 22:50 编辑]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
【优质项目推荐】 1、项目代码均经过严格本地测试,运行OK,确保功能稳定后才上传平台。可放心下载并立即投入使用,若遇到任何使用问题,随时欢迎私信反馈与沟通,博主会第一时间回复。 2、项目适用于计算机相关专业(如计科、信息安全、数据科学、人工智能、通信、物联网、自动化、电子信息等)的在校学生、专业教师,或企业员工,小白入门等都适用。 3、该项目不仅具有很高的学习借鉴价值,对于初学者来说,也是入门进阶的绝佳选择;当然也可以直接用于 毕设、课设、期末大作业或项目初期立项演示等。 3、开放创新:如果您有一定基础,且热爱探索钻研,可以在此代码基础上二次开发,进行修改、扩展,创造出属于自己的独特应用。 欢迎下载使用优质资源!欢迎借鉴使用,并欢迎学习交流,共同探索编程的无穷魅力! 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需
以下是在openEuler上安装Oracle数据库的步骤: 1. 下载Oracle数据库的安装包。可以从Oracle官网下载,需要注册账号并同意许可协议。 2. 安装必要的软件包,如gcc、libaio1、libaio-devel等。可以使用以下命令安装: ``` sudo dnf install gcc libaio1 libaio-devel ``` 3. 创建一个Oracle用户和组。可以使用以下命令创建: ``` sudo groupadd oinstall sudo groupadd dba sudo useradd -g oinstall -G dba oracle ``` 4. 修改系统内核参数。可以使用以下命令进行修改: ``` sudo vi /etc/sysctl.conf ``` 在文件中添加以下内容: ``` fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 1073741824 kernel.shmmax = 4398046511104 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 ``` 保存文件并执行以下命令使修改生效: ``` sudo sysctl -p ``` 5. 创建Oracle安装目录并设置权限。可以使用以下命令创建: ``` sudo mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1 sudo chown -R oracle:oinstall /u01 sudo chmod -R 775 /u01 ``` 6. 解压Oracle安装包并运行安装程序。可以使用以下命令进行解压: ``` unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip ``` 然后切换到解压后的目录并执行安装程序: ``` ./runInstaller ``` 按照安装向导进行安装。在安装过程中,需要选择安装类型、安装目录、数据库名称、管理员账号等。 7. 安装完成后,需要执行一些后续配置。可以使用以下命令进行配置: ``` sudo vi /etc/oratab ``` 在文件中添加以下内容: ``` orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y ``` 保存文件后,执行以下命令启动数据库: ``` sudo su - oracle sqlplus / as sysdba startup ``` 至此,在openEuler上安装Oracle数据库的步骤就完成了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值