結果

問題 No.1585 Cubic Number
ユーザー merlinmerlin
提出日時 2021-07-08 22:21:24
言語 Java17
(openjdk 17.0.1)
結果
AC  
実行時間 85 ms / 1,000 ms
コード長 494 bytes
コンパイル時間 1,816 ms
使用メモリ 38,132 KB
最終ジャッジ日時 2023-02-01 19:54:12
合計ジャッジ時間 5,903 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 77 ms
38,108 KB
testcase_01 AC 81 ms
35,668 KB
testcase_02 AC 78 ms
36,220 KB
testcase_03 AC 82 ms
35,724 KB
testcase_04 AC 83 ms
35,608 KB
testcase_05 AC 76 ms
35,628 KB
testcase_06 AC 78 ms
35,620 KB
testcase_07 AC 77 ms
35,480 KB
testcase_08 AC 79 ms
38,132 KB
testcase_09 AC 81 ms
37,680 KB
testcase_10 AC 73 ms
35,588 KB
testcase_11 AC 72 ms
35,652 KB
testcase_12 AC 77 ms
35,592 KB
testcase_13 AC 67 ms
35,428 KB
testcase_14 AC 80 ms
36,164 KB
testcase_15 AC 85 ms
35,448 KB
testcase_16 AC 82 ms
38,048 KB
testcase_17 AC 73 ms
35,668 KB
testcase_18 AC 71 ms
37,560 KB
testcase_19 AC 85 ms
37,792 KB
testcase_20 AC 85 ms
35,632 KB
testcase_21 AC 73 ms
35,588 KB
testcase_22 AC 85 ms
35,604 KB
testcase_23 AC 79 ms
38,056 KB
testcase_24 AC 84 ms
37,616 KB
testcase_25 AC 85 ms
35,824 KB
testcase_26 AC 72 ms
35,592 KB
testcase_27 AC 82 ms
35,696 KB
testcase_28 AC 84 ms
35,796 KB
testcase_29 AC 81 ms
35,600 KB
testcase_30 AC 69 ms
35,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        long n=Long.parseLong(bu.readLine());
        int i; boolean ans=false;
        for(i=1;i<=1000000;i++)
        if(1l*i*i*i==n) ans=true;
        if(ans) sb.append("Yes\n");
        else sb.append("No\n");
        System.out.print(sb);
    }
}
0