結果

問題 No.8026 Third Power Problem
ユーザー ぴろず
提出日時 2017-03-31 23:35:44
言語 Java
(openjdk 23)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 314 bytes
コンパイル時間 2,150 ms
コンパイル使用メモリ 77,636 KB
実行使用メモリ 54,240 KB
最終ジャッジ日時 2024-07-07 06:10:04
合計ジャッジ時間 5,016 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

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