結果

問題 No.3023 素数判定するだけ
ユーザー 👑 tatt61880tatt61880
提出日時 2020-04-06 00:18:36
言語 Kuin
(KuinC++ v.2021.9.17)
結果
TLE  
実行時間 -
コード長 276 bytes
コンパイル時間 1,824 ms
コンパイル使用メモリ 144,908 KB
実行使用メモリ 8,704 KB
最終ジャッジ日時 2023-10-14 16:05:45
合計ジャッジ時間 4,608 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,372 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
out.cpp: 関数 ‘bool k_ar(int64_t)’ 内:
out.cpp:1817:1: 警告: 制御が非 void 関数の終りに到達しました [-Wreturn-type]
 1817 | }
      | ^

ソースコード

diff #

func isYes(n: int): bool
	for i(true $ int, n)
		if(i = true $ int)
			skip i
		end if
		if(n % i = false $ int)
			ret i = n
		end if
	end for
end func

func main()
	var n: int :: cui@input().toInt(&)
	var ans: bool :: @isYes(n)
	do cui@print(ans ?("YES\n", "NO\n"))
end func
0