結果
| 問題 | No.2479 Sum of Squares |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-11-25 01:50:53 |
| 言語 | PHP (8.5.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 284 bytes |
| 記録 | |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 36,780 KB |
| 実行使用メモリ | 37,292 KB |
| 最終ジャッジ日時 | 2026-04-13 12:58:38 |
| 合計ジャッジ時間 | 4,596 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 22 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
// Your code here!
$input = trim(fgets(STDIN));
do{
$kon = floor(sqrt($input)); //一番大きい平方根取得
$heihou[] = $kon * $kon; //平方数に変換
$input = $input - ($kon * $kon);
}while($input > 0);
echo count($heihou)."\n";
echo implode(" ", $heihou);