#include<stdio.h>
int keta(int a); /* 与えられた桁数を全て足して3の倍数か否かを返す関数 */
int main()
{
int a,w;
/* printf("\n%dの桁数を足すと%dです.\n",a,w=keta(a)); */
printf((w
=keta
(a
))?"3の倍数ではありません\n":"3の倍数です\n");
return(0);
}
int keta(int a)
{
if((a < 3)&&(a>-3))return(a);
return keta(a%10%3+a / 10);
}
I2luY2x1ZGU8c3RkaW8uaD4KCmludCBrZXRhKGludCBhKTsgICAgICAgIC8qIOS4juOBiOOCieOCjOOBn+ahgeaVsOOCkuWFqOOBpui2s+OBl+OBpjPjga7lgI3mlbDjgYvlkKbjgYvjgpLov5TjgZnplqLmlbAgKi8KCmludCBtYWluKCkKewogIGludCBhLHc7CgogIHByaW50Zigi5pWw44KS5YWl5Yqb44GX44Gm5LiL44GV44GEOiIpOwogIHNjYW5mKCIlZCIsJmEpOwogIC8qICAgcHJpbnRmKCJcbiVk44Gu5qGB5pWw44KS6Laz44GZ44GoJWTjgafjgZkuXG4iLGEsdz1rZXRhKGEpKTsgKi8KICBwcmludGYoKHc9a2V0YShhKSk/IjPjga7lgI3mlbDjgafjga/jgYLjgorjgb7jgZvjgpNcbiI6IjPjga7lgI3mlbDjgafjgZlcbiIpOwoKICByZXR1cm4oMCk7Cn0KCmludCBrZXRhKGludCBhKQp7CiAgaWYoKGEgPCAzKSYmKGE+LTMpKXJldHVybihhKTsKICByZXR1cm4ga2V0YShhJTEwJTMrYSAvIDEwKTsKfQ==