// http://p...content-available-to-author-only...h.net/test/read.cgi/tech/1399810335/717
// 717 名前:デフォルトの名無しさん [sage]: 2014/06/09(月) 15:57:35.27 ID:KVOF4ter
// ある病院で4と13(例えば104とか113とか)を使わないで全ての病室に番号を振りたいと考えている
// この場合1000室目は何番になるか答えなさい(´・ω・`)
#include<stdio.h>
#include<string.h>
int main()
{
int i; // x号室
int n; // x室目
char b[16];
n = 0;
for (i = 1; n < 1000; i++) {
continue;
}
n++;
}
printf("%d室目 --> %d号室\n", n
, i
); return 0;
}
Ly8gIGh0dHA6Ly9wLi4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi5oLm5ldC90ZXN0L3JlYWQuY2dpL3RlY2gvMTM5OTgxMDMzNS83MTcKLy8gIDcxNyDlkI3liY3vvJrjg4fjg5Xjgqnjg6vjg4jjga7lkI3nhKHjgZfjgZXjgpMgW3NhZ2Vd77yaIDIwMTQvMDYvMDko5pyIKSAxNTo1NzozNS4yNyBJRDpLVk9GNHRlcgovLyAg44GC44KL55eF6Zmi44GnNOOBqDEz77yI5L6L44GI44GwMTA044Go44GLMTEz44Go44GL77yJ44KS5L2/44KP44Gq44GE44Gn5YWo44Gm44Gu55eF5a6k44Gr55Wq5Y+344KS5oyv44KK44Gf44GE44Go6ICD44GI44Gm44GE44KLCi8vICDjgZPjga7loLTlkIgxMDAw5a6k55uu44Gv5L2V55Wq44Gr44Gq44KL44GL562U44GI44Gq44GV44GEKMK044O7z4njg7vvvYApCiNpbmNsdWRlPHN0ZGlvLmg+CiNpbmNsdWRlPHN0cmluZy5oPgppbnQgbWFpbigpCnsKICAgIGludCBpOyAgICAgICAgICAgICAgICAgICAgICAvLyB45Y+35a6kCiAgICBpbnQgbjsgICAgICAgICAgICAgICAgICAgICAgLy8geOWupOebrgogICAgY2hhciBiWzE2XTsKICAgIG4gPSAwOwogICAgZm9yIChpID0gMTsgbiA8IDEwMDA7IGkrKykgewogICAgICAgIHNwcmludGYoYiwgIiVkIiwgaSk7CiAgICAgICAgaWYgKHN0cnN0cihiLCAiNCIpIHx8IHN0cnN0cihiLCAiMTMiKSkgewogICAgICAgICAgICBjb250aW51ZTsKICAgICAgICB9CiAgICAgICAgbisrOwogICAgfQogICAgcHJpbnRmKCIlZOWupOebriAtLT4gJWTlj7flrqRcbiIsIG4sIGkpOwogICAgcmV0dXJuIDA7Cn0K