#include <stdio.h>
int main()
{
int flag, sum, n;
flag = 1;
sum = 0;
for (n = 1; n <= 100; n++){
sum += n * n;
if (flag && sum >= 100) {
printf("sumが初めて100以上になる n=%d\n", n
); flag = 0;
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewogIGludCBmbGFnLCBzdW0sIG47CgogIGZsYWcgPSAxOwogIHN1bSA9IDA7CiAgZm9yIChuID0gMTsgbiA8PSAxMDA7IG4rKyl7CiAgICBzdW0gKz0gbiAqIG47CiAgICBpZiAoZmxhZyAmJiBzdW0gPj0gMTAwKSB7CiAgICAgIHByaW50Zigic3Vt44GM5Yid44KB44GmMTAw5Lul5LiK44Gr44Gq44KLIG49JWRcbiIsIG4pOwogICAgICBmbGFnID0gMDsKICAgIH0KICB9CiAgcHJpbnRmKCLnt4/lkow9JWRcbiIsIHN1bSk7Cn0K