[中譯] ProjectEuler 456 Triangles containing the ori

看板puzzle (益智遊戲 - 數獨,拼圖,推理,西洋棋)作者 (流刑人形)時間12年前 (2014/02/25 07:16), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
456. Triangles containing the origin II http://projecteuler.net/problem=456 定義: x_n = (1248^n mod 32323) - 16161 y_n = (8421^n mod 30103) - 15051 P_n = {(x_1, y_1), (x_2, y_2), ..., (x_n, y_n)} 例如,P_8 = {(-14913, -6630), (-10161, 5625), (5226, 11896), (8340, -10778), (15852, -5203), (-15165, 11295), (-1427, -14495), (12407, 1060)}。 令C(n)為三頂點都在P_n上且包含原點在其內部的三角形的個數。 例如: C(8) = 20 C(600) = 8950634 C(40000) = 2666610948988 請求出C(2000000)。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 129.2.129.154
文章代碼(AID): #1J2zB3HU (puzzle)
文章代碼(AID): #1J2zB3HU (puzzle)