2009-05-01ãã1ã¶æéã®è¨äºä¸è¦§
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q171. åæ¡ã®èªä¹åãèªä¹ã«ãªãæ°ã§1020ããå°ãããã®ã®ç·åã®æå¾ã®9æ¡ã èªä¹åã®ã»ãããèããã20æ¡ã¾ã§ãªã®ã§ã20*9*9以ä¸ã®èªä¹æ°ãèããã°ãããããããã«ã¤ãã¦ãèªä¹ã«ããåå²ãæ±ãâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q170. çç¥ æ大ã®ãã®ãæ¢ããã¨ãããã¨ãªã®ã§ã9876543210ããæ¢ç´¢ãã¦ããã°ãããé ã5以ä¸ãªã2åå²ããããããªããã¨ããããã2ã¤ã«åããæ°ã®æå¤§å ¬ç´æ°ãå¾ã¦ããã®ç´æ°ã§å²ãã
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q169. 1025ã2ã®ã¹ãã§åå²ããæ¹æ³ã®åæ°ããã ãã1ãOKãåãæ°ã¯2ã¤ã¾ã§ã æ®éã«ãå帰ã§æ¸ããã大ããæ°ãã使ã£ã¦ãããããããã¨ä½å使ãããã§é¢æ°ã«ããã2m以ä¸ãã使ããªãã¨ãã2m+2â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q168. 142857ã®7ãåã«æã£ã¦ãã¦714285ã¨ããã¨ãå ã®æ°ãç´æ°ã«ãªããããªnã®10 < n < 10100ã®ç·åã®æå¾ã®5æ¡ã dãå ã®æ°ã®æå¾ã®æ¡ã®æ°åãmãæ¡æ°ã¨ããã¨ã 10m-1d+(n-d)/10 = ((10m-1)d+n)/â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q166. 4Ã4ã®ãã¹ç®ã«0ã9ãç½®ãã¦ã縦ã»æ¨ªã»æãã®åãããããçãããªãå ´åã®æ°ã ã¾ãã4é ã«æ°åãç½®ããããã¦ããã¨5ã¤æ°åãç½®ãã°ãã¹ç®ãåã¾ã£ã¦ãã¹ã¦çãããªãããå¤å®ã§ããã4é ã¯â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q163. çç¥ ä¸è§å½¢å ã®ç¹ãçæããããã®ç¹ãã伸ã³ãç·ã2æ¬é¸ã¶ãä¸æ¹ã®ç·ä¸ã§ä¸è§å½¢å ã®ç¹ãã伸ã³ãç·ã¨ä»æ¹ã®ç·ã¨ã®äº¤ç¹ãæ±ããããããä¸è§å½¢å ãªãã«ã¦ã³ãããã
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q165. ä¸ããããç似乱æ°ã§çºçããã5000æ¬ã®ç·åã®çã®äº¤ç¹ã®åæ° ãã 交ç¹ãæ±ãã¦ããã ããåã交ç¹ã¯éè¤ãã¦æ°ããªãã®ã§ãsetã«addãã¦ããããããã3300æ¬ç®ãããããã¡ã¢ãªã足ããªãâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q164. 20æ¡ã§æåã0ã§ãªããé£ç¶ãã3æ¡ã足ãã¦ãããã9以ä¸ã«ãªãèªç¶æ°ã®åæ° næ¡ã§æå¾ã®2æ¡ã決ã¾ã£ãé£ç¶ãã3æ¡ã足ãã¦ãããã9以ä¸ã«ãªãèªç¶æ°ã®åæ°ãæ±ãã漸åå¼ãä½ãã
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q162. 16æ¡ã®16é²æ°ã§ã0ã»1ã»Aã1ã¤ä»¥ä¸å«ã¿ããã¤æåã0ã§ãªãæ°ã®åæ°ã16é²æ°ã§è¡¨ã æåã0ã§ãªãã¨ããæ¡ä»¶ãåãé¤ãã¨ç°¡åããããæ±ãã¦ãããæåã®æ°åã§å ´åããããã
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q160. f(n)ãn!ã®0ãé¤ãæå¾ã®5æ¡ã¨ãããf(1012)ãæ±ããã nã¾ã§ã®5ã§å²ãåããæ°ãé¤ãã¦ããã¤2ã®å åã5ã¤ã¾ã§åãé¤ããç©ãg(n)ã¨ãããä¾ãã°ã g(6) = 1 * (2/2) * 3 * (4/4) * (6/2) = â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q159. èªç¶æ°ã®åæ¡ã®åãã¨ããããã«ããã1æ¡ã«ãªãã¾ã§ãããç¹°ãè¿ãããã®å¤ãDRã¨å¼ã¶ãä¾ãã°ã467â17â8ãèªç¶æ°nãç©ã®å½¢ã«æ¸ãã¦ããã®å åã®DRã®åè¨ã®æ大ãmdrs(n)ã¨ããã1 < n < 100â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q158. 26åã®ã¢ã«ãã¡ãããããéãæånåãæã£ã¦ãã¦ä¸¦ã¹ãããã®ã¨ã"bacdef"ã®ããã«è¾æ¸é ã«ä¸¦ãã§ããªãé¨åã1ç®æã ãã®æååã®æ°ãp(n)ã¨ãããæ大ã®p(n)ã ã¢ã«ãã¡ãããã¯åããã«â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q157. 1/a + 1/b = p/10nã®1 ⤠n ⤠9ã§ã®è§£ã®åæ° æ¯è¼çå¹³æãªåé¡ã ãã1 ⤠n ⤠9ã¨ããã®ãããããããªãã£ããããã¯ãä¾ãã°ã 1/2 + 1/5 = 7/10 1/2 + 1/5 = 70/100 ãããã¯å¥ã®è§£ã¨ãããâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q154. (x + y + z)200000ã®ä¿æ°ã§ãããã1012ã®åæ°ã§ããåæ° n = m + k + lã¨ãã¦ãn!/m!k!l!ãä¿æ°ã¨ãªããããã2ã¨5ã12å以ä¸å«ãã°ããã 5ã®åæ°ã¯ã[n/5] + [n/52] + ... - ([k/5] + [k/5â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q151. çç¥ å°çã®ç¶æ ã¨ãã®ç¶æ ãåã確çãè¨ç®ãã¦ãããæåã«A2ãA5ã®ç´ã1æãã¤å ¥ã£ã¦ãããããã確ç1ã§ããã次ã®ç¶æ ã¯ãã©ã®ç´ãåããã§å¤ãã£ã¦ãããããããããããã®ç¶æ ã®ç¢ºçâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q150. 決ããããç似乱æ°ï¼ãªã³ã¯å åç §ï¼ãä¸è§å½¢ç¶ã«ä¸¦ã¹ãã¨ããåãåãã®å°ä¸è§å½¢å ã®åã®æå° åãè¦ã¦ããã¨ããé ç¹ã決ãã¦ããããä¸ã«ä¸è§å½¢ãåºãã¦åãåã£ã¦ããã ããã§ãä¸ååãâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q148. ãã¹ã«ã«ã®ä¸è§å½¢ã®æåã®10ååã®ä¸ã§7ã§å²ãåããªãé ã®åæ° n!ãå«ãã§ãã7ã®åæ°ã¯ã [n/7] + [n/72] + ... nCkãå«ãã§ãã7ã®åæ°ã¯ã [n/7] - [k/7] - [(n-k)/7] + [n/72] - [k/72] â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q147. 47Ã43ã®é·æ¹å½¢ã®ä¸ã«ãããã«å¹³è¡ãããã¯45度å¾ããé·æ¹å½¢ãç½®ãããã®ãããªé·æ¹å½¢ã®æ°ã¨ãå ã®47Ã43ã®é·æ¹å½¢ãåã¾ãå¹³è¡ãªé·æ¹å½¢ã«åã¾ãé·æ¹å½¢ã®æ°ã®åã 辺ã®é·ããM,Nã¨ããã¨ã å¹³è¡â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q147. 47Ã43ã®é·æ¹å½¢ã®ä¸ã«ãããã«å¹³è¡ãããã¯45度å¾ããé·æ¹å½¢ãç½®ãããã®ãããªé·æ¹å½¢ã®æ°ã¨ãå ã®47Ã43ã®é·æ¹å½¢ãåã¾ãå¹³è¡ãªé·æ¹å½¢ã«åã¾ãé·æ¹å½¢ã®æ°ã®åã 辺ã®é·ããM,Nã¨ããã¨ã å¹³è¡â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q145. ããæ£æ´æ°ã§ãããã¨ããã10é²ã§éã«ããæ°ã®åã®å ¨ã¦ã®æ¡ãå¥æ°ã®ã¨ããreversibleã¨å¼ã¶ã10åæªæºã®reversibleãªæ°ã®åæ°ã æ¡æ°ãå¶æ°ã®ã¨ããã©ã®æ¡ãå転ããæ°åã¨è¶³ãã¦å¥æ°ã§ãç¹°â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q140. GnãG1 = 1ãG2 = 4ãGk = Gk-1 + Gk-2ãAG(x) = xG1 + x2G2 + x3G3 + ...ã¨ããã n = AG(x)ãèªç¶æ°ã§ããxãæçæ°ã§ãããããªnã®30çªç®ã Q137ã¨åãããã«ããã¨ã (5A + 7)2 - 5m2 = 4â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q137. Fnããã£ããããæ°åã¨ããã¨ããAF(x) = xF1 + xF2 + xF3 + ...ã¨ããã n = AF(x)ãèªç¶æ°ã§ããxãæçæ°ã§ãããããªnã®15çªç®ã (1 - x - x2)A = x Ax2 + (A - 1)x - A = 0 D = (A - 1)â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q136. èªç¶æ°nã«ã¤ãã¦ãèªç¶æ°x,y,zãçå·®æ°åã«ãªã£ã¦ãã¦ãx2 - y2 - z2 = nãæºããã¨ããããã®ãããªè§£ã1ã¤ã ããã7500ä¸ããå°ããnã®åæ°ã 注ææ·±ã調ã¹ãã¨ãpãç´ æ°ã¨ãã¦ãnã¯4ã®å°ä½â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q135. èªç¶æ°nã«ã¤ãã¦ãèªç¶æ°x,y,zãçå·®æ°åã«ãªã£ã¦ãã¦ãx2 - y2 - z2 = nãæºããã¨ããããã®ãããªè§£ã10ãã100ä¸ããå°ããnã®åæ°ã d = y - zã¨ãã¦ã (z + 2d)2 - (z + d)2 - z2 = n (â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q134. ç´ æ°p1ã¨ãã®æ¬¡ã®ç´ æ°p2ã«å¯¾ãã¦ãp1ããå°»ã«ããæ°ã§p2ã§å²ãåãããã®ããp1ã5以ä¸ã§å¿ ããããä¾ãã°ãp1=19,p2=23ãªãã1219ã23ã§å²ãåãããp1ã5ãã100ä¸ã¾ã§ã«ã¤ãã¦ã®ãã®æå°ã®â¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q133. 1ãkåç¶ãæ´æ°ãR(k)ã¨è¡¨ããR(10n)ã®å½¢ã®å æ°ã«ãªãããªã100ä¸æªæºã®ç´ æ°ã®ç·åã ããã¯ã²ã£ããã ãæåããªããããã ã¨æã£ãã ç´ æ°pã«ã¤ãã¦ãkã2ããè¦ã¦ãããæåã«2ã¨5ã®å æ°ãâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q131. n3 + pn2ãç«æ¹æ°ã¨ãªãããç´ æ°pã®100ä¸ä»¥ä¸ã®åæ° n3 + pn2 = (n + k)3 (p-3k)n2 - 3k2n - k3 = 0 D = 4pk - 3k2 å¤å¥å¼ãå¹³æ¹æ°ã ããã 4pk - 3k2 = m2 3m2 + (3k-2p)2 = 4p2 ããã§æ«æâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q129. 1ãkåç¶ãæ°R(k)ãèãããä¾ãã°ãR(6) = 111111ãããããnãæåã«å²ãåããã®ãR(k)ã ã¨ããã¨ããA(n) = kã¨æ¸ããA(n)ãæåã«100ä¸ãè¶ ããnã åé¡ãè¦ãã¨ãéæ¹ããªãè¨ç®ã ã¨æâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q128. èªç¶æ°ã1ããæ£å è§å½¢ç¶ã®ã¹ãã¤ã©ã«ã«ä¸¦ã¹ãããã®ã¨ããé ç½®ãããæ°nã¨é£ã®6ã¤ã®æ°ã¨ã®å·®ã®ãã¡ã®ç´ æ°ã®æ°ãPD(n)ã¨ãããPD(n)=3ã¨ãªã2000çªç®ã®nã¯ï¼ 座æ¨ããä¸ã«xãããããå·¦60°ã«yâ¦
ããã¸ã§ã¯ããªã¤ã©ã¼ http://projecteuler.net/index.php Q126. ç«æ¹ä½ã®ãããã¯ãç´æ¹ä½ç¶ã«ä¸¦ã¹ãããã®ãããã¯ãæä½éè¦ãããã«ãããã¯ã並ã¹ãã¨ãã®ãããã¯ã®å¢åãããã«ãã®ãããã¯ãè¦ãããã«ãããã¯ã並ã¹ãã¨ãã®å¢åã...ãèããããâ¦