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