結果

問題 No.3026 Third Power Problem
ユーザー shinwisteriashinwisteria
提出日時 2017-03-31 23:08:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 2,985 ms
コンパイル使用メモリ 72,228 KB
実行使用メモリ 56,488 KB
最終ジャッジ日時 2023-09-21 11:22:11
合計ジャッジ時間 6,906 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,700 KB
testcase_01 AC 115 ms
56,064 KB
testcase_02 AC 114 ms
55,948 KB
testcase_03 AC 114 ms
56,332 KB
testcase_04 AC 115 ms
55,968 KB
testcase_05 AC 112 ms
55,592 KB
testcase_06 AC 115 ms
55,716 KB
testcase_07 AC 115 ms
56,116 KB
testcase_08 AC 119 ms
55,820 KB
testcase_09 AC 117 ms
55,504 KB
testcase_10 AC 115 ms
55,804 KB
testcase_11 AC 119 ms
55,696 KB
testcase_12 AC 118 ms
55,504 KB
testcase_13 AC 118 ms
56,168 KB
testcase_14 AC 116 ms
54,496 KB
testcase_15 AC 117 ms
55,736 KB
testcase_16 AC 116 ms
56,164 KB
testcase_17 AC 113 ms
55,692 KB
testcase_18 AC 117 ms
55,536 KB
testcase_19 AC 114 ms
55,952 KB
testcase_20 AC 115 ms
55,496 KB
testcase_21 AC 117 ms
56,488 KB
testcase_22 AC 115 ms
55,796 KB
testcase_23 AC 115 ms
56,112 KB
testcase_24 AC 115 ms
55,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class ThirdPowerProblem {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		s.close();
		int t = (int)Math.pow(10, 9)+ 7;
		long r = N % t;
		r = (r * N) % t;
		r = (r * N) % t;
		System.out.println(r);

	}

}
0