Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MysteriousClass
- {
- public static void main(String[] args)
- {
- int i = 20;
- int b = m2(i);
- System.out.println(b + i);
- }
- public static int m1(int i)
- {
- int n = 0;
- while (n * n <= i)
- {
- n++;
- }
- return n - 1;
- }
- public static int m2(int a)
- {
- int b = 0;
- for (int n = 0; n < a; n++)
- {
- int i = m1(n);
- b = b + i;
- }
- return b;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement