結果

問題 No.3026 Third Power Problem
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-03-31 22:45:44
言語 Java19
(openjdk 21)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 1,764 ms
コンパイル使用メモリ 71,116 KB
実行使用メモリ 56,756 KB
最終ジャッジ日時 2023-09-21 11:02:06
合計ジャッジ時間 5,728 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,904 KB
testcase_01 AC 114 ms
56,344 KB
testcase_02 AC 114 ms
55,696 KB
testcase_03 AC 115 ms
56,756 KB
testcase_04 AC 117 ms
55,948 KB
testcase_05 AC 116 ms
56,544 KB
testcase_06 AC 116 ms
56,228 KB
testcase_07 AC 115 ms
56,376 KB
testcase_08 AC 115 ms
55,896 KB
testcase_09 AC 112 ms
56,192 KB
testcase_10 AC 114 ms
56,448 KB
testcase_11 AC 114 ms
56,212 KB
testcase_12 AC 113 ms
56,248 KB
testcase_13 AC 116 ms
55,796 KB
testcase_14 AC 114 ms
54,404 KB
testcase_15 AC 115 ms
56,324 KB
testcase_16 AC 112 ms
55,764 KB
testcase_17 AC 117 ms
56,420 KB
testcase_18 AC 113 ms
55,832 KB
testcase_19 AC 115 ms
56,144 KB
testcase_20 AC 117 ms
55,504 KB
testcase_21 AC 117 ms
56,444 KB
testcase_22 AC 113 ms
56,124 KB
testcase_23 AC 117 ms
56,044 KB
testcase_24 AC 117 ms
55,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long mod = 1000000007L;
        long ans = N*N%mod*N%mod;
        System.out.println(ans);
    }
}
0