2011-03-01ãã1ã¶æéã®è¨äºä¸è¦§
ä¹ç® ä»®æ°é¨ã12ããããã¤ã«ããã¦æãç®ããã°ç°¡åã§ãããã®ä¸24ããããåãã¾ããåæ¨äºå ¥ã¯ãã¦ãã¾ãããææ°é¨ã¯åç´ã«è¶³ãç®ã§ããæå¾ã«ç¬¦å·ãã¤ãã¾ãã
å æ¸ç® ææ°ãåããã¦å æ¸ç®ããã ãã§ããææ°ã¯å¤§ããã»ãã«åããã¾ãããã®éã«ä»®æ°é¨ãåæ¨äºå ¥ã§ãªãåãæ¨ã¦ããããã¨ãããã¾ãããç´°ãããã¨ã¯æ°ã«ããªããã¨ã«ãã¾ãã
ããããã¡ã¤ã«ã§ã¯æ¬æ¥æ´æ°æ¼ç®ããã§ããªãã®ã§ãããIEEE754ã®å精度ãã¨ãã¥ã¬ã¼ããããã¨ã«ããæµ®åå°æ°ç¹æ°æ¼ç®ãå®ç¾ãã¾ããProject Euler 25ã解ããã°ããã®ã§ãå³å¯ã«ã¨ãã¥ã¬ã¼ãã¯ãã¾ãããIEEE754ã®å精度ã¯ãç°¡åã«è¨ãã¨ä»®æ°é¨ã23ãããâ¦
Problem 25 ãã®åé¡ã¯é·æ´æ°ãªã©ä½¿ãå¿ è¦ã¯ãªããæ¬æ¥Fibonacciæ°åã®ä¸è¬é ã ã使ãã°å³è§£ãã¾ããå³è¾ºç¬¬2é ã¯nã大ãããªãã°é常ã«å°ããã®ã§ç¡è¦ã§ãã¾ãã ãã ãããããã¡ã¤ã«ã§ã¯æ´æ°ã®æ¼ç®ããã§ãã¾ããã次åããã¯ã工夫ãã¦å°æ°ã®è¨ç®ãã§ãâ¦
http://projecteuler.net/index.php?section=problems&id=330 eã£ã¦Eulerã®eãªãã ã£ãï¼ ã¨ããããa(10)ãåºãã¦ã¿ããã ãã£ã¨a(10)åºããã§ãããã®å ã©ããã£ã¦ããã°ããã®ã
Problem 25 ãã£ããããæ°åãªã®ã§è¶³ãã¦ããã ãã§ãã1000æ¡ã¾ã§è¨ç®ããªããã°ãªããªãããã§ãããéå»ã«ä½ã£ãé·ãæ´æ°ã®ããã®é¢æ°ç¾¤ã使ãã°ç°¡åã§ãã16åããã£ã¦çããåºã¾ããã
Problem 24 é åãé çªã«åºãã¦ã¿ã¾ããããã©ãããã¢ã«ã´ãªãºã ã«ããã°ãããã¨ããã¨ãä¾ãã° 02431ã®æ¬¡ã¯ 03124ã§ããã¾ããå¾ãããè¦ã¦ãã£ã¦æåã«æ°åãå°ãããªãã¨ãããæ¢ãã¾ãã2ã®ã¨ããã§ãããããã¦ãã¾ãå¾ãããè¦ã¦ãã£ã¦2ãã大ããæ°â¦
Problem 24 ãã®åé¡ã¯è§£ãã ããªãæè¨ç®ã¬ãã«ã§ããä¾ãã°ã0ã3ã¾ã§ã使ã£ãã¨ãã¦9çªç®ã®é åã¯ãããã¾ã§åæããã¨ã 0123 0132 0213 0231 0312 0321 1023 1032 1203ã¨ãªãã¾ããããããã®ããã«åããã¨ããããããã§ãã 0123 0132 0213 0231 031â¦
Problem 23 6ãå®å ¨æ°ã§ã12以ä¸ã®6ã®åæ°ãéå°æ°ã§ãããã¨ã¯ããã«ãããã¾ãããªã®ã§ã6ã®å°ä½ã§åé¡ãã¦èããã¨ããã§ãã ä¾ãã°6ã®å°ä½ã2ï¼ä»¥ä¸ãr = 2ãªã©ã¨è¡¨è¨ããï¼ãªã20ãr = 4ãªã40ã«ãªãã¾ããããããå¥æ°ã¯ããªãã¡2ãå æ°ã«å«ããªãã®â¦
http://projecteuler.net/index.php?section=problems&id=329 ãã®åé¡ã¯ç°¡åãã§ãããã¨æã£ããè¹´ãããããªã«ãééã£ã¦ããã®ãï¼ å ¨ç¶éã£ã¦ãã20çæ»ãè¾¼ã¿ããªãããããã®ãã¹ã©ã¹ã©ã¨æ¸ããªãã®ã ããã
Problem 23 Problem 21ã¨åãããã«ç´æ°ã®åãæ±ãã¦ã28123ããå°ããéå°æ°ã®ãªã¹ããå¾ã¾ãã28123ããå°ããã¤ã³ããã¯ã¹ã®é åãä½ã£ã¦ã0ã«åæåãã¾ããããã¦ãå ¨ã¦ã®éå°æ°ã®ãã¢ã®åãåã£ã¦ãã®è¦ç´ ã1ã«ãã¾ãã ãããããã®æ¹æ³ã¯å¤§ããªé åâ¦
http://projecteuler.net/index.php?section=problems&id=328 ã¾ãé£ããããªåé¡ãåºããã§ããä»åã¯è±èªã¯æããã£ãã C(8)åºããã©ãC(100)ã¯ééã£ã¦ããã C(100)åºããã§ãã20ä¸ã¯æ°åæéãããããã ããããã3æéçµã£ã¦ãã¾ã 誰ã解ãã¦ããªâ¦
Problem 22 ãã®åé¡ã¯ããã¡ã¤ã«ãèªã¿è¾¼ãã®ãé£ããã§ããã©ãããããã©ã«ãã§ã¯ä¸åº¦ã«8192ãã¤ã以ä¸ã¯èªããªãããã§ãã for /F %%s in (names.txt) do ( echo %%s ) é©å½ãªæåã§åºåã£ã¦å°ããã¤èªãã°é·ãæååã§ãèªãã¾ããä¾ãã°Zã§åºåã£ã¦ãâ¦
http://projecteuler.net/index.php?section=problems&id=327 ä»æé»è»ã®ä¸ã§ãã¼ãã«åãã£ã¦èãã¦ããããM(C,R)ãå®è³ª1è¡ã§æ¸ããæ¹æ³ãæãã¤ããããªãã ã£ããã ããã£ãããO(R)ã ããR = 30ã«ã ã¾ãããã
http://projecteuler.net/index.php?section=problems&id=327 æè¨ç®ã§C=3ã®ã¨ãã¯ããã£ããããããM(4,6)ããªããªãåºãªããããããªãã¨ãåºããé£ããã
http://projecteuler.net/index.php?section=problems&id=327 è±èªã®é·æããããæå³ãããããªãããªãã¨ãç解ããããããã¾ã§ã«ã©ãã ãæéãããã£ãã ããã ã§ãããã¯ã©ããã£ã¦è§£ãã°ããã®ããªï¼
Problem 21 大ããªé åãåãã¨åçã«é ããªãã®ã§ãå°ããé åã§ã¨ã©ãã¹ããã¹ã®ãµããçã«ç´æ°ã®åãåã£ã¦ã¿ã¾ããããã ããããããã¨ç´æ°ã®åã®ããã«ããä¸ã¤é åãå¿ è¦ã«ãªãã¾ããä¾ãã°ã10ãªããa[10]=10ã¨b[10]=1ã¨ãã¾ããbãç´æ°ã®åã§ãã2â¦
æ´æ°ã®ç¯å²ã§å¹³æ¹æ ¹ãæ±ãããããªãã¡æ´æ°Nã«å¯¾ãã¦[âN]ãæ±ãã¾ããããã¯ç°¡åãªã¢ã«ã´ãªãºã ã§æ±ãããã¾ããNãåæå¤ã¨ãã¦ãx -> [([N / x] + x) / 2]ãç¹°ãè¿ããå¤ãæ¸å°ããªããªã£ããããã®åã®å¤ãå¹³æ¹æ ¹ã§ããä¾ãã°ã10 -> [(10 / 10 + 10) / 2â¦
Problem 21 ä»åº¦ã¯ããµã¤ãã«ã¨ã©ãã¹ããã¹ã®ãµããçã«ç´æ°ã®åãæ±ãã¾ããããã ããå¤æ°ã®æ°ãå¤ããªãã¨é ããªãã®ã§ãã¾ãæå°ã®ç´ å æ°ãè¨é²ãã¦ããã¦ãããã«ç´æ°ã®åãä¸æ¸ãããæ¹æ³ãåãã¾ããããã§ãã10000ãå¤æ°ãããã¨é常ã«é ããªãã¾â¦
Problem 21 ç´æ°ã®åã¨ããã°ç´ å æ°å解ãç´ å æ°å解ã¨ããã°ã¨ã©ãã¹ããã¹ã®ãµããã§ãããæåã¯åç´ãªç´æ°ã®æ±ãæ¹ã使ãã¾ããããä¾ãã°ã20ã®ç´æ°ãæ±ãããã¨ããã¨ã[â20] = 4ã ãã2ã4ã¾ã§ã§å²ãåããã調ã¹ãã°ããã§ããforã§åãåæ°ã決ã¾ã£â¦