@@ -0,0 +1,653 @@
+import java.util.Scanner;%0A%0Apublic class Main %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        Scanner sc = new Scanner(System.in);%0A%0A        while (true) %7B%0A%0A            int n = sc.nextInt();%0A%0A            if (n == -1) %7B%0A                break;%0A            %7D%0A%0A            double x = 1;%0A            double y = 0;%0A%0A            double r = Math.PI;%0A%0A            for (int i = 2; i %3C= n; i++) %7B%0A%0A                r -= Math.PI / 2;%0A%0A                x += Math.cos(r);%0A                y += Math.sin(r);%0A%0A                r = Math.atan2(y, x) - Math.PI;%0A%0A            %7D%0A%0A            System.out.println(x);%0A            System.out.println(y);%0A%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

Create : 0076