sum of square numbers by rings

import java.io.*;class test {public static void main(String[] a) throws Exception{while(true){String s=new BufferedReader(new InputStreamReader(System.in),1).readLine();int t=0,i;for(i=0;i++<Long.parseLong(s);)t+=i*i;System.out.println(t);}}}\x0d

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page