Problem 9: Special Pythagorean triplet
flag = 0
for a in range(1,1000):
for b in range(a+1,1000):
if a*a + b*b == (1000-a-b)**2:
print(a,b)
flag = 1
break
if flag == 1:
break print(a*b*(1000-a-b))
Problem 9: Special Pythagorean triplet的更多相关文章
- projecteuler Problem 9 Special Pythagorean triplet
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2 Fo ...
- (Problem 9)Special Pythagorean triplet
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a2 + b2 = c2 For exampl ...
- Special Pythagorean triplet
这个比较简单,慢慢进入状态. A Pythagorean triplet is a set of three natural numbers, a b c, for which, a2 + b2 = ...
- projecteuler---->problem=9----Special Pythagorean triplet
title: A Pythagorean triplet is a set of three natural numbers, a b c, for which, a2 + b2 = c2 For e ...
- Project Euler Problem 9-Special Pythagorean triplet
我是俩循环暴力 看了看给的文档,英语并不好,有点懵,所以找了个中文的博客看了看:勾股数组学习小记.里面有两个学习链接和例题. import math def calc(): for i in rang ...
- Python练习题 037:Project Euler 009:毕达哥拉斯三元组之乘积
本题来自 Project Euler 第9题:https://projecteuler.net/problem=9 # Project Euler: Problem 9: Special Pythag ...
- Project Euler Problem9
Special Pythagorean triplet Problem 9 A Pythagorean triplet is a set of three natural numbers, a b ...
- PE 001~010
题意: 001(Multiples of 3 and 5):对小于1000的被3或5整除的数字求和. 002(Even Fibonacci numbers):斐波那契数列中小于等于4 000 000的 ...
- PE刷题记
PE 中文翻译 最喜欢做这种很有意思的数学题了虽然数学很垃圾 但是这个网站的提交方式好鬼畜啊qwq 1.Multiples of 3 and 5 直接枚举 2.Even Fibonacci numbe ...
随机推荐
- 基于配置文件的Spring注入
基于配置文件的Spring注入 1.依赖注入的概述 依赖注入指的是通过Spring配置文件的方式创建对象时,直接通过配置的方式将数据注入到该对象的标量类型属性,并从Spring容器中获取指定对象注入到 ...
- 代码生成器——实现生成pojo,sql,mapper接口
代码生成器(记录一次兴趣代码,多多指教.转载请标明作者) 在我们开始实现代码生成器之前我们先来对代码生成器有一个简单的了解. 1.什么是代码生成器? 故名思义,也就是生成代码的一个程序.那它是一个什么 ...
- GhostCore核心使用完全指南 - 传送门
Ghostcore,小坏制作,QQ 532073265,切记不要使用破解版本,后果自负 更新日志 数据表集合 了解模板机制 基本设置 自动备份数据库 自定义字符 扩展的GM命令 NPC脚本(包括幻化. ...
- bzoj 2286: [Sdoi2011]消耗战 虚树+树dp
2286: [Sdoi2011]消耗战 Time Limit: 20 Sec Memory Limit: 512 MB[Submit][Status][Discuss] Description 在一 ...
- 上传图片组件封装 element ui
// element ui 文档地址: http://element.eleme.io/#/zh-CN <template> <div> <div class=" ...
- 编译原理中DFA最小化
关于编译原理最小化的操作,专业术语请移步至:http://www.360doc.com/content/18/0601/21/11962419_758841916.shtml 这里只是记录一下个人的理 ...
- (3)arp协议
arp协议:通过ip找mac(交换机不能识别ip) arp解析表: mac 和 ip 的映射关系 arp协议: 通过ip找到mac,可以减少广播的频率,减少主机的损耗. arp协议: 能够完成,依靠交 ...
- 关于生物项目上的blast和viroblast
最近要做一个跟生物有关的项目,隔行如隔山呀,好多工具以前都没听过,blast分到我头上啦,查查,查查 BLAST (Basic Local Alignment Search Tool)是一套在蛋白质数 ...
- 在Debian9服务器上安装最新版Python
通过Xshell 6 远程连接linux服务器 安装前的准备工作 更新服务器: 命令:apt update && apt upgrade -y 安装python3的依赖库: 命令:ap ...
- day 11 装饰器
1.day 10 内容复习 # 之前做得的题 以后再遇到能保证会 # 下周二考 :所有的知识 # 面试题:认真对待 # # 三元运算符 # 接收结果的变量 = 条件为真的结果 if 条件 else 条 ...