結果

問題 No.276 連続する整数の和(1)
ユーザー kkkk
提出日時 2015-09-16 00:57:17
言語 PHP
(8.3.4)
結果
AC  
実行時間 16 ms / 1,000 ms
コード長 161 bytes
コンパイル時間 1,143 ms
コンパイル使用メモリ 18,688 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2023-09-26 12:07:17
合計ジャッジ時間 1,691 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,824 KB
testcase_01 AC 16 ms
18,876 KB
testcase_02 AC 15 ms
18,944 KB
testcase_03 AC 16 ms
18,860 KB
testcase_04 AC 16 ms
18,748 KB
testcase_05 AC 16 ms
18,868 KB
testcase_06 AC 15 ms
18,828 KB
testcase_07 AC 15 ms
18,936 KB
testcase_08 AC 16 ms
18,868 KB
testcase_09 AC 16 ms
18,896 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$input = trim(fgets(STDIN));
$sum = 0;

$multiple = 1;

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

echo $multiple . "\n";
0