16 lines
264 B
C
16 lines
264 B
C
//
|
|
// Created by xfj12 on 2025/3/25.
|
|
//
|
|
#include <solution/367.h>
|
|
#include <stdint.h>
|
|
|
|
bool isPerfectSquare(int num)
|
|
{
|
|
for (int64_t i = 1;; i++)
|
|
{
|
|
if (i * i > num)
|
|
return false;
|
|
if (i * i == num)
|
|
return true;
|
|
}
|
|
} |