{"type":"rich","blog_title":"C++\u7af6\u30d7\u30ed\u5b66\u7fd2\u65e5\u8a18(\u4eee)","provider_name":"Hatena Blog","title":"C++ \u3067 \u6841\u548c","url":"https://chiwawa-star.hatenablog.com/entry/2016/09/12/015235","provider_url":"https://hatena.blog","width":"100%","published":"2016-09-12 01:52:35","blog_url":"https://chiwawa-star.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/chiwawa_star/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchiwawa-star.hatenablog.com%2Fentry%2F2016%2F09%2F12%2F015235\" title=\"C++ \u3067 \u6841\u548c - 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>","author_name":"chiwawa_star","height":"190","categories":["\u30b3\u30fc\u30c9","\u7af6\u30d7\u30ed\u30e1\u30e2"],"version":"1.0","image_url":null,"description":"#include <bits/stdc++.h> using namespace std; int digit( int N ) { while( N >= 10 ) { int tmp{}; while( N > 0 ) { tmp += ( N % 10 ); N /= 10; } N = tmp; } return N; } int main() { int N{}; cin >> N; cout << digit( N ) << endl; return 0; } \u3068\u3042\u308b\u554f\u984c\u3067\u6841\u548c\u3092\u4f7f\u3046\u306e\u304b\u3068\u601d\u3063\u3066\u66f8\u3044\u305f\u306e\u3067\u3059\u304c\u3001 \u7d50\u679c\u7684\u306b\u6841\u548c\u4e0d\u8981\u3060\u3063\u305f\u306e\u3067\u3001\u6841\u548c\u30b3\u30fc\u30c9\u3060\u3051\u500b\u5225\u306b\u6b8b\u3057\u307e\u3059...\u3002\u4f8b\u3048\u3070\u2026"}