Untitled
unknown
java
a year ago
345 B
3
Indexable
import java.util.Scanner; public class P1 { public static int Sol(int x, int n) { int s = 1; for (int i = 1; i <= n; i++) s *= x; return s; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); System.out.println(Sol(x, n)); } }
Editor is loading...
Leave a Comment