結果

問題 No.300 平方数
コンテスト
ユーザー tsuchinaga
提出日時 2019-03-13 15:19:23
言語 Go
(1.26.1)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
WA  
実行時間 -
コード長 247 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 13,282 ms
コンパイル使用メモリ 281,804 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-03-08 13:06:14
合計ジャッジ時間 15,119 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

import (
	"fmt"
	"math"
)

func main() {
	var x int
	_, _ = fmt.Scan(&x)

	for y := 1; y <= x; y++ {
		z := math.Sqrt(float64(x * y))
		// fmt.Println(x, y, z)
		if math.Ceil(z) == math.Floor(z) {
			fmt.Println(y)
			break
		}
	}
}
0