結果

問題 No.1585 Cubic Number
ユーザー ks2mks2m
提出日時 2021-07-08 22:21:41
言語 Java17
(openjdk 17.0.1)
結果
AC  
実行時間 115 ms / 1,000 ms
コード長 336 bytes
コンパイル時間 1,745 ms
使用メモリ 42,684 KB
最終ジャッジ日時 2023-02-01 19:55:21
合計ジャッジ時間 6,653 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 107 ms
38,856 KB
testcase_01 AC 98 ms
42,404 KB
testcase_02 AC 107 ms
40,296 KB
testcase_03 AC 112 ms
41,644 KB
testcase_04 AC 108 ms
42,684 KB
testcase_05 AC 109 ms
40,208 KB
testcase_06 AC 111 ms
42,248 KB
testcase_07 AC 108 ms
40,264 KB
testcase_08 AC 100 ms
40,260 KB
testcase_09 AC 96 ms
40,300 KB
testcase_10 AC 99 ms
42,284 KB
testcase_11 AC 101 ms
40,280 KB
testcase_12 AC 109 ms
42,212 KB
testcase_13 AC 104 ms
42,384 KB
testcase_14 AC 110 ms
42,548 KB
testcase_15 AC 111 ms
42,316 KB
testcase_16 AC 110 ms
40,720 KB
testcase_17 AC 109 ms
40,920 KB
testcase_18 AC 110 ms
40,368 KB
testcase_19 AC 107 ms
40,520 KB
testcase_20 AC 109 ms
40,572 KB
testcase_21 AC 112 ms
40,504 KB
testcase_22 AC 107 ms
40,520 KB
testcase_23 AC 109 ms
42,352 KB
testcase_24 AC 109 ms
42,012 KB
testcase_25 AC 110 ms
40,228 KB
testcase_26 AC 108 ms
40,376 KB
testcase_27 AC 112 ms
40,416 KB
testcase_28 AC 97 ms
42,396 KB
testcase_29 AC 115 ms
42,352 KB
testcase_30 AC 105 ms
40,588 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