結果

問題 No.1585 Cubic Number
ユーザー ks2mks2m
提出日時 2021-07-08 22:21:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 336 bytes
コンパイル時間 2,275 ms
コンパイル使用メモリ 72,320 KB
実行使用メモリ 57,776 KB
最終ジャッジ日時 2023-09-14 06:01:37
合計ジャッジ時間 8,212 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,420 KB
testcase_01 AC 125 ms
55,908 KB
testcase_02 AC 130 ms
55,644 KB
testcase_03 AC 131 ms
55,864 KB
testcase_04 AC 129 ms
55,940 KB
testcase_05 AC 130 ms
56,020 KB
testcase_06 AC 129 ms
55,956 KB
testcase_07 AC 131 ms
56,028 KB
testcase_08 AC 126 ms
55,664 KB
testcase_09 AC 120 ms
55,780 KB
testcase_10 AC 121 ms
55,780 KB
testcase_11 AC 124 ms
55,816 KB
testcase_12 AC 128 ms
55,456 KB
testcase_13 AC 127 ms
55,980 KB
testcase_14 AC 125 ms
55,740 KB
testcase_15 AC 130 ms
57,776 KB
testcase_16 AC 127 ms
55,980 KB
testcase_17 AC 129 ms
56,028 KB
testcase_18 AC 129 ms
55,908 KB
testcase_19 AC 127 ms
55,788 KB
testcase_20 AC 128 ms
55,768 KB
testcase_21 AC 127 ms
53,832 KB
testcase_22 AC 133 ms
56,012 KB
testcase_23 AC 129 ms
55,480 KB
testcase_24 AC 129 ms
56,364 KB
testcase_25 AC 130 ms
55,704 KB
testcase_26 AC 129 ms
55,676 KB
testcase_27 AC 128 ms
55,904 KB
testcase_28 AC 124 ms
56,044 KB
testcase_29 AC 128 ms
55,912 KB
testcase_30 AC 129 ms
55,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		for (long i = 1; i <= 1000000; i++) {
			if (i * i * i == n) {
				System.out.println("Yes");
				return;
			}
		}
		System.out.println("No");
	}
}
0