14.01.2013 Views

Soluciones y Explicación de los problemas ACM ... - ICPC Bolivia

Soluciones y Explicación de los problemas ACM ... - ICPC Bolivia

Soluciones y Explicación de los problemas ACM ... - ICPC Bolivia

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Explicaciones a <strong>los</strong> <strong>problemas</strong> South American Regionals 2008 41<br />

V[n]=V[n-1]+n*n;<br />

while( true ) {<br />

n = in.nextInt();<br />

if( n == 0 )<br />

break;<br />

System.out.println( V[n] );<br />

}<br />

}<br />

}<br />

Programa C que soluciona el problema<br />

#inclu<strong>de</strong><br />

int main()<br />

{<br />

long V[101];<br />

long n;<br />

for( V[0]=0,n=1; n

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!