题意: 给定一个整数L(L<=1e12),计算(x,y,z)组的个数.其中x<y<z,x^2+y^2=z^2,gcd(x,y)==1,gcd(x,z)==1,gcd(y,z)==1. 思路: 以下的方法可用来找出勾股数.设m>n . m 和 n 均是正整数, a = m^2-n^2 b = 2mn c = m^2+n^2 若 m 和 n 是互质,而且 m 和 n 其中有一个是偶数,计算出来的 (a, b, c) 就是素勾股数 然后我们需要的便是计算m,n互质 qie m,…
题目来源:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=42 Fermat vs. Pythagoras Background Computer generated and assisted proofs and verification occupy a small niche in the realm…
暂时搞不到<Programming Erlang>,最近就一直在看Erlang自带的例子和Reference Manual.基础语法方面有一些过去遗漏或者没有注意的,断断续续仅记于此. 1.Erlang的保留字有: after and andalso band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse query receive rem try when xor 基本都是些用于…