結果
| 問題 |
No.8023 素数判定するだけ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-10 19:35:09 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 311 bytes |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-23 13:32:32 |
| 合計ジャッジ時間 | 3,682 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
local n=tonumber(io.read())
local zero=math.floor(math.sin(math.pi))
local one=math.abs(math.cos(math.pi))
local two=math.floor(math.exp(one))
local cheker=true
for i=two,math.sqrt(n) do
if n%i==zero then
cheker=false
end
end
if n==one then
cheker=false
end
print(cheker and "YES" or "NO")