結果

問題 No.278 連続する整数の和(2)
ユーザー kkkk
提出日時 2015-09-19 10:48:07
言語 PHP
(8.3.4)
結果
TLE  
実行時間 -
コード長 253 bytes
コンパイル時間 634 ms
コンパイル使用メモリ 18,616 KB
実行使用メモリ 18,940 KB
最終ジャッジ日時 2023-09-26 13:33:13
合計ジャッジ時間 4,130 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,940 KB
testcase_01 AC 16 ms
18,844 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$input = trim(fgets(STDIN));

//割り切れる数の最大値
$max = 1;

if (($input%2)==0){
    $max = $input / 2;
}else{
    $max = $input;
}

$mp = 0;

for ($i=1; $i<=$max; $i++){
    if ($max%$i==0){
    	$mp += $i;
    }
}

echo $mp . "\n";
0