結果

問題 No.2203 POWER!!!!!
ユーザー kanenistkanenist
提出日時 2023-02-08 13:08:22
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 376 bytes
コンパイル時間 3,528 ms
コンパイル使用メモリ 71,284 KB
実行使用メモリ 64,748 KB
最終ジャッジ日時 2023-09-20 05:38:36
合計ジャッジ時間 9,322 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
60,104 KB
testcase_01 AC 127 ms
55,720 KB
testcase_02 AC 126 ms
55,652 KB
testcase_03 AC 132 ms
55,756 KB
testcase_04 AC 134 ms
55,804 KB
testcase_05 AC 141 ms
56,072 KB
testcase_06 AC 137 ms
55,624 KB
testcase_07 AC 134 ms
55,720 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a[] = new int[n + 1];
		long sum = 0;
		for(int i = 1; i <= n; i++) a[i] = sc.nextInt();
		for(int i = 1; i <= n; i++){
			for(int j = 1; j <= n; j++){
				sum += Math.pow(a[i],a[j]);
			}
		}
		System.out.println(sum);
	}
}
0