#include <stdio.h>
#define TRUE 1==1
int main()
{ int height, cnt = 0, sum = 0;
while (TRUE) {
if (height == 0)
break;
sum += height;
cnt++;
}
if (cnt == 0)
cnt = 1;
printf("合計 = %d, 平均 = %d\n", sum
, sum
/ cnt
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgVFJVRSAxPT0xCmludCBtYWluKCkKeyAgIGludCBoZWlnaHQsIGNudCA9IDAsIHN1bSA9IDA7CiAgICB3aGlsZSAoVFJVRSkgewogICAgICAgIHByaW50Zigi5YWl5YqbWyVkXSA9ICIsIGNudCArIDEpOwogICAgICAgIHNjYW5mKCIlZCIsICZoZWlnaHQpOwogICAgICAgIGlmIChoZWlnaHQgPT0gMCkKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgc3VtICs9IGhlaWdodDsKICAgICAgICBjbnQrKzsKICAgIH0KICAgIGlmIChjbnQgPT0gMCkKICAgICAgICBjbnQgPSAxOwogICAgcHJpbnRmKCLlkIjoqIggPSAlZCwg5bmz5Z2HID0gJWRcbiIsIHN1bSwgc3VtIC8gY250KTsKICAgIHJldHVybiAwOwp9Cg==