# Project Euler #152: Writing 1/2 as a sum of inverse squares

# Project Euler #152: Writing 1/2 as a sum of inverse squares

+ 1 comment I dont understand the output format

+ 0 comments If this is out of school, totally understand, but thought I would see if anybody could point me in the right direction within the rules of the competition. I've got a working solution in a reasonable amount of time for the base euler 152 problem with the fraction of 1/2 for up to 100, but am still failing most of the test cases. What are some of the corner cases to consider in tracking down the missing combinations?

+ 1 comment What is time/memory constraint for this problem ?

+ 0 comments I didnt get what the question is?

+ 0 comments import java.io.

*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner sc=new Scanner(System.in); long n=sc.nextInt(); long sum=0; for(long ni=1;ni<=n;ni++) { for(long a=1;a<=ni;a++) { for(long b=0;b`} } } } System.out.println(sum);`

} }

Sort 9 Discussions, By:

Please Login in order to post a comment