fork(5) download
  1. package com.company;
  2. import java.util.Scanner;
  3. public class Main {
  4.  
  5. public static void main(String[] args) {
  6. int n, temp = 1;
  7. Scanner scanner = new Scanner(System.in);
  8. n = scanner.nextInt();
  9. int [] numbers = new int[n];
  10. for (int i = 0; i < n; i++) {
  11. Scanner scanner1 = new Scanner(System.in);
  12. int a = scanner1.nextInt();
  13. Scanner scanner2 = new Scanner(System.in);
  14. int b = scanner2.nextInt();
  15. for (int j = 1; j <= b; j++) {
  16. temp *= a;
  17. }
  18. numbers[i] = temp;
  19. temp = 1;
  20. }
  21. for (int i = 0; i < n; i++) {
  22. System.out.println(numbers[i] % 10);
  23. }
  24. }
  25. }
Runtime error #stdin #stdout #stderr 0.08s 50008KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: Could not find or load main class Main
Caused by: java.lang.NoClassDefFoundError: com/company/Main (wrong name: Main)