{"type":"rich","author_name":"chiwawa_star","blog_title":"C++\u7af6\u30d7\u30ed\u5b66\u7fd2\u65e5\u8a18(\u4eee)","url":"https://chiwawa-star.hatenablog.com/entry/2015/12/08/025437","height":"190","provider_name":"Hatena Blog","width":"100%","blog_url":"https://chiwawa-star.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchiwawa-star.hatenablog.com%2Fentry%2F2015%2F12%2F08%2F025437\" title=\"CODE FESTIVAL 2015 \u3042\u3055\u3077\u308dEasy A - \u30d8\u30a4\u30db\u30fc\u541b\u3068\u52a0\u7b97 - C++\u7af6\u30d7\u30ed\u5b66\u7fd2\u65e5\u8a18(\u4eee)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/chiwawa_star/","categories":["\u7af6\u30d7\u30ed","AtCoder","\u95a2\u6570"],"title":"CODE FESTIVAL 2015 \u3042\u3055\u3077\u308dEasy A - \u30d8\u30a4\u30db\u30fc\u541b\u3068\u52a0\u7b97","version":"1.0","published":"2015-12-08 02:54:37","description":"kou\u3055\u3093\u306b\u7121\u8a00\u3067URL\u3060\u3051\u30ea\u30d7\u30e9\u30a4\u3055\u308c\u305f\u306e\u3067\u89e3\u3044\u305f\u3067\u3059(\u591a\u5206\u89e3\u3051\u306e\u610fcode-festival-2015-morning-easy.contest.atcoder.jp #include<iostream> #include<cmath> using namespace std; int main(){ int n; cin >> n; int x = sqrt(n);//\u5e73\u65b9\u6839 if(x*x==n){//\u7b49\u3057\u3044\u5834\u5408 cout << 0 << endl; return 0; } x+=1; cout << (x*x)-n << endl; return 0; } sqrt(n); \u3068\u3044\u3046\u95a2\u6570\u2026","image_url":null}