結果

問題 No.1585 Cubic Number
ユーザー tentententen
提出日時 2021-07-12 09:53:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 55 ms / 1,000 ms
コード長 983 bytes
コンパイル時間 2,684 ms
コンパイル使用メモリ 71,120 KB
実行使用メモリ 49,720 KB
最終ジャッジ日時 2023-09-14 20:29:47
合計ジャッジ時間 5,789 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
49,548 KB
testcase_01 AC 44 ms
47,264 KB
testcase_02 AC 54 ms
49,700 KB
testcase_03 AC 55 ms
49,596 KB
testcase_04 AC 54 ms
49,692 KB
testcase_05 AC 54 ms
49,596 KB
testcase_06 AC 54 ms
49,476 KB
testcase_07 AC 54 ms
49,452 KB
testcase_08 AC 45 ms
49,188 KB
testcase_09 AC 44 ms
49,268 KB
testcase_10 AC 45 ms
49,276 KB
testcase_11 AC 45 ms
49,604 KB
testcase_12 AC 54 ms
49,496 KB
testcase_13 AC 55 ms
49,692 KB
testcase_14 AC 53 ms
49,620 KB
testcase_15 AC 54 ms
49,720 KB
testcase_16 AC 54 ms
33,912 KB
testcase_17 AC 54 ms
33,800 KB
testcase_18 AC 53 ms
33,796 KB
testcase_19 AC 53 ms
34,220 KB
testcase_20 AC 53 ms
33,868 KB
testcase_21 AC 53 ms
34,248 KB
testcase_22 AC 54 ms
33,880 KB
testcase_23 AC 54 ms
33,780 KB
testcase_24 AC 53 ms
34,116 KB
testcase_25 AC 54 ms
33,816 KB
testcase_26 AC 54 ms
33,792 KB
testcase_27 AC 53 ms
33,884 KB
testcase_28 AC 41 ms
33,528 KB
testcase_29 AC 54 ms
33,860 KB
testcase_30 AC 53 ms
33,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        long n = sc.nextLong();
        for (long i = 1; i <= 1000000; i++) {
            if (i * i * i == n) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
}
class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public String next() throws Exception {
        if (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
}
0