{"blog_title":"inamori\u2019s diary","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20170520%2Fp1\" title=\"Bash\u3067Project Euler\uff087\uff09 \u914d\u5217 - inamori\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Bash\u3067Project Euler\uff087\uff09 \u914d\u5217","width":"100%","version":"1.0","author_name":"inamori","author_url":"https://blog.hatena.ne.jp/inamori/","published":"2017-05-20 00:00:00","type":"rich","provider_name":"Hatena Blog","description":"Bash\u306b\u914d\u5217\u306f\u3042\u308a\u307e\u3059\u3002\u305f\u3060\u3001\u3068\u3066\u3082\u9045\u3044\u3067\u3059\u3002 white space\u3067\u533a\u5207\u3063\u3066()\u3067\u62ec\u308b\u3068\u914d\u5217\u306b\u306a\u308a\u307e\u3059\u3002 #!/bin/bash a=(1 2) a+=(3) echo ${a[@]} # 1 2 3 a+=(3)\u306f\u3001\u898b\u305f\u901a\u308a\u8981\u7d20\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u306f\u672c\u5f53\u306b\u8ffd\u52a0\u306a\u306e\u3067\u3057\u3087\u3046\u304b\u3002\u591a\u304f\u306e\u8981\u7d20\u3092\u8ffd\u52a0\u3057\u3066\u3001\u7d4c\u904e\u6642\u9593\u3092\u8abf\u3079\u308c\u3070\u3060\u3044\u305f\u3044\u308f\u304b\u308a\u307e\u3059\u3002 #!/bin/bash N=$1 a=() for n in `seq 1 $N`; do a+=($n) done \u3053\u308c\u3092\u3001\u5f15\u6570\u3092\u5909\u3048\u3066time\u3067\u6642\u9593\u8a08\u6e2c\u3059\u308b\u3068 arg 100000 1000000 10000000 real 0m0.656s 0\u2026","url":"https://inamori.hateblo.jp/entry/20170520/p1","blog_url":"https://inamori.hateblo.jp/","image_url":null,"provider_url":"https://hatena.blog","categories":["Bash"],"height":"190"}