#include <stdio.h>
//課題B-1: 1からnまでの和を求めるコードを完成させてください
int sum(int n){
int c=n;
while(n-->0)
c+=n;
return c;
}
int main(void) {
int a,b;
a = 100;
b = sum(a);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v6Kqy6aGMQi0xOiAx44GL44KJbuOBvuOBp+OBruWSjOOCkuaxguOCgeOCi+OCs+ODvOODieOCkuWujOaIkOOBleOBm+OBpuOBj+OBoOOBleOBhAppbnQgc3VtKGludCBuKXsKCWludCBjPW47Cgl3aGlsZShuLS0+MCkKCQljKz1uOwogICAgcmV0dXJuIGM7Cn0KCmludCBtYWluKHZvaWQpIHsKCWludCBhLGI7CiAgICBhID0gMTAwOwogICAgYiA9IHN1bShhKTsKICAgIHByaW50ZigiMeOBi+OCiSVk44G+44Gn44Gu5ZKM44GvJWQiLCBhLGIgKTsKCXJldHVybiAwOwp9Cg==