/* http://t...content-available-to-author-only...h.net/test/read.cgi/tech/1339338438/415 */
#include <stdio.h>
#include <stdlib.h>
int X(int n)
{
if (n < 1)
return 0;
return 2 * X(n - 1) + 1;
}
int main(int argc, char *argv[])
{
int i;
if (argc == 1)
else
for (i = 1; i < argc; i++) {
printf("X(%d) = %d\n", n
, X
(n
)); }
return 0;
}
LyogaHR0cDovL3QuLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLmgubmV0L3Rlc3QvcmVhZC5jZ2kvdGVjaC8xMzM5MzM4NDM4LzQxNSAqLwoKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBYKGludCBuKQp7CiAgICBpZiAobiA8IDEpCiAgICAgICAgcmV0dXJuIDA7CiAgICByZXR1cm4gMiAqIFgobiAtIDEpICsgMTsKfQoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKewogICAgaW50IGk7CiAgICBpZiAoYXJnYyA9PSAxKQogICAgICAgIHByaW50ZigiWCgwKSA9ICVkXG4iLCBYKDApKTsKICAgIGVsc2UKICAgICAgICBmb3IgKGkgPSAxOyBpIDwgYXJnYzsgaSsrKSB7CiAgICAgICAgICAgIGludCBuID0gYXRvaShhcmd2W2ldKTsKICAgICAgICAgICAgcHJpbnRmKCJYKCVkKSA9ICVkXG4iLCBuLCBYKG4pKTsKICAgICAgICB9CiAgICByZXR1cm4gMDsKfQ==