fork download
  1.  
  2. /* Name of the class has to be "Main" only if the class is public. */
  3. class Ideone
  4. {
  5. public static void main (String[] args) throws java.lang.Exception
  6. {
  7. int i,j,sum=0;
  8. for(i=1;i<=100;i++){
  9. j=i*i;
  10. sum=sum+j;}
  11. System.out.println("合計="+sum+"");
  12. // your code goes here
  13. }
  14. }
Success #stdin #stdout 0.09s 55580KB
stdin
Standard input is empty
stdout
合計=338350