結果

問題 No.3026 Third Power Problem
ユーザー 37zigen37zigen
提出日時 2017-03-31 23:50:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 538 bytes
コンパイル時間 2,397 ms
コンパイル使用メモリ 72,836 KB
実行使用メモリ 57,976 KB
最終ジャッジ日時 2023-09-21 12:55:11
合計ジャッジ時間 6,379 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,600 KB
testcase_01 AC 116 ms
55,812 KB
testcase_02 AC 117 ms
55,452 KB
testcase_03 AC 116 ms
55,660 KB
testcase_04 AC 119 ms
57,976 KB
testcase_05 AC 116 ms
55,972 KB
testcase_06 AC 116 ms
55,608 KB
testcase_07 AC 115 ms
55,996 KB
testcase_08 AC 118 ms
55,996 KB
testcase_09 AC 118 ms
55,440 KB
testcase_10 AC 116 ms
56,068 KB
testcase_11 AC 118 ms
56,356 KB
testcase_12 AC 120 ms
55,932 KB
testcase_13 AC 117 ms
56,160 KB
testcase_14 AC 118 ms
55,776 KB
testcase_15 AC 118 ms
55,804 KB
testcase_16 AC 116 ms
55,692 KB
testcase_17 AC 117 ms
55,668 KB
testcase_18 AC 116 ms
55,892 KB
testcase_19 AC 119 ms
56,140 KB
testcase_20 AC 119 ms
55,796 KB
testcase_21 AC 119 ms
55,668 KB
testcase_22 AC 124 ms
55,636 KB
testcase_23 AC 119 ms
55,948 KB
testcase_24 AC 119 ms
55,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		new Main().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		long MODULO = (long) (1e9 + 7);
		long N = sc.nextLong() % MODULO;
		long ans = 1;
		for (int i = 0; i < 3; ++i) {
			ans = (ans * N) % MODULO;
		}
		System.out.println(ans);
	}

	void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}
}
0