結果
| 問題 |
No.136 Yet Another GCD Problem
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2019-05-04 08:50:56 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 227 bytes |
| コンパイル時間 | 217 ms |
| コンパイル使用メモリ | 6,816 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 19:52:57 |
| 合計ジャッジ時間 | 1,394 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
local n, k = io.read("*n", "*n")
local found = false
local lim = math.ceil(math.sqrt(n))
for i = 2, lim do
if(n % i == 0) then
found = true
print(math.floor(n / i))
break
end
end
if(not found) then print(1) end