結果

問題 No.3026 Third Power Problem
ユーザー ぴろずぴろず
提出日時 2017-03-31 23:35:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 314 bytes
コンパイル時間 1,856 ms
コンパイル使用メモリ 71,620 KB
実行使用メモリ 56,492 KB
最終ジャッジ日時 2023-09-21 12:19:36
合計ジャッジ時間 5,954 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,464 KB
testcase_01 AC 117 ms
55,936 KB
testcase_02 AC 117 ms
55,528 KB
testcase_03 AC 117 ms
56,492 KB
testcase_04 AC 117 ms
55,548 KB
testcase_05 AC 118 ms
55,404 KB
testcase_06 AC 117 ms
55,928 KB
testcase_07 AC 118 ms
55,852 KB
testcase_08 AC 117 ms
55,892 KB
testcase_09 AC 117 ms
55,752 KB
testcase_10 AC 118 ms
55,536 KB
testcase_11 AC 118 ms
55,528 KB
testcase_12 AC 120 ms
55,612 KB
testcase_13 AC 117 ms
55,992 KB
testcase_14 AC 117 ms
55,608 KB
testcase_15 AC 117 ms
55,660 KB
testcase_16 AC 117 ms
55,860 KB
testcase_17 AC 117 ms
55,800 KB
testcase_18 AC 117 ms
54,456 KB
testcase_19 AC 117 ms
55,540 KB
testcase_20 AC 118 ms
55,992 KB
testcase_21 AC 118 ms
55,844 KB
testcase_22 AC 119 ms
53,652 KB
testcase_23 AC 126 ms
55,644 KB
testcase_24 AC 118 ms
55,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no3026;

import java.util.Scanner;

public class Main {

	public static long MOD = 1000000007;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(cube(n));
	}
	public static long cube(long n) {
		return n * n % MOD * n % MOD;
	}
}
0