Advertisement
Yesver08

Segitiga Ajaib

Jan 30th, 2021
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. public class Solution {
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner sc = new Scanner(System.in);
  8.         int N = sc.nextInt(), x = 1;
  9.         for (int i = 1; i < N; i++) x *= 2;
  10.         System.out.println(x/N);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement