結果

問題 No.3023 素数判定するだけ
ユーザー 👑 tatt61880tatt61880
提出日時 2020-04-24 01:13:33
言語 Kuin
(KuinC++ v.2021.9.17)
結果
TLE  
実行時間 -
コード長 270 bytes
コンパイル時間 1,907 ms
コンパイル使用メモリ 144,656 KB
実行使用メモリ 8,704 KB
最終ジャッジ日時 2023-10-14 16:23:13
合計ジャッジ時間 6,651 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,356 KB
testcase_01 AC 2 ms
4,372 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_ap(int64_t)’ 内:
out.cpp:1783:1: 警告: 制御が非 void 関数の終りに到達しました [-Wreturn-type]
 1783 | }
      | ^

ソースコード

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@inputInt()
	var ans: bool :: @isYes(n)
	do cui@print(ans ?("YES\n", "NO\n"))
end func
0