{"url":"https://memo.sugyan.com/entry/20111002/1317523739","categories":["Perl"],"author_url":"https://blog.hatena.ne.jp/sugyan/","title":"Google Code Jam Japan 2011 \u4e88\u9078","image_url":null,"provider_name":"Hatena Blog","blog_url":"https://memo.sugyan.com/","description":"Google Code Jam Japan 2011 C\u554f\u984c\u3060\u3051\u306a\u3093\u3068\u304b\u901a\u3063\u305f\u3002 \u4e0e\u3048\u3089\u308c\u305f\u6574\u6570\u30922\u3064\u306e\u6574\u6570\u306e\u548c\u3067\u8868\u3057\u305f\u5834\u5408\u306b\u305d\u308c\u305e\u308c\u306e\u6574\u6570\u5024\u3067\u7acb\u3063\u3066\u3044\u308b\u30d3\u30c3\u30c8\u6570\u306e\u7dcf\u548c\u306e\u6700\u5927\u5024\u3092\u6c42\u3081\u308b\u3001\u3068\u3044\u3046\u3082\u306e\u3002 #!/usr/bin/perl use strict; use warnings; use Math::BigInt; my $T = <>; for my $X (1 .. $T) { my $line = <>; my $a = solve($line); printf \"Case #%d: %d\\n\", $X, $a; } sub solve { my $N = Math::BigInt->\u2026","provider_url":"https://hatena.blog","blog_title":"\u3059\u304e\u3083\u30fc\u3093\u30e1\u30e2","author_name":"sugyan","height":"190","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmemo.sugyan.com%2Fentry%2F20111002%2F1317523739\" title=\"Google Code Jam Japan 2011 \u4e88\u9078 - \u3059\u304e\u3083\u30fc\u3093\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","published":"2011-10-02 11:48:59","version":"1.0"}