結果
| 問題 |
No.2479 Sum of Squares
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-11-25 01:50:53 |
| 言語 | PHP (843.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 284 bytes |
| コンパイル時間 | 3,345 ms |
| コンパイル使用メモリ | 32,020 KB |
| 実行使用メモリ | 32,788 KB |
| 最終ジャッジ日時 | 2024-09-26 10:08:39 |
| 合計ジャッジ時間 | 8,760 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);