ProjectEuler 489 Common factors between two sequences - 拼圖
By Carol
at 2014-12-11T23:07
at 2014-12-11T23:07
Table of Contents
489. Common factors between two sequences
http://projecteuler.net/problem=489
G(a,b)定義為最小的非負整數使得 gcd(n^3 + b, (n + a)^3 + b) 為最大
例如,G(1,1)=5,因為n等於5時,gcd(n^3 + 1, (n + 1)^3 + 1)達到其最大值七
而在0<=n<5時有較小的gcd值
令 H(m, n) 為1<=a<=m 且 1<=b<=n的情況下,G(a,b)的總和值
給定兩筆測資 H(5, 5) = 128878 且 H(10, 10) = 32936544
試求出H(18, 1900)
--
http://projecteuler.net/problem=489
G(a,b)定義為最小的非負整數使得 gcd(n^3 + b, (n + a)^3 + b) 為最大
例如,G(1,1)=5,因為n等於5時,gcd(n^3 + 1, (n + 1)^3 + 1)達到其最大值七
而在0<=n<5時有較小的gcd值
令 H(m, n) 為1<=a<=m 且 1<=b<=n的情況下,G(a,b)的總和值
給定兩筆測資 H(5, 5) = 128878 且 H(10, 10) = 32936544
試求出H(18, 1900)
--
Tags:
拼圖
All Comments
Related Posts
HEYE 拼圖品質問題
By Sierra Rose
at 2014-12-09T23:22
at 2014-12-09T23:22
強人所難的賭注
By Isla
at 2014-12-09T13:41
at 2014-12-09T13:41
hanayama還買的到嗎
By Zanna
at 2014-12-07T21:46
at 2014-12-07T21:46
[分享]意外發現客製化拼圖自動販賣機!
By Harry
at 2014-12-05T14:30
at 2014-12-05T14:30
島 001
By Irma
at 2014-12-04T12:22
at 2014-12-04T12:22