結果

問題 No.276 連続する整数の和(1)
ユーザー kkkk
提出日時 2015-09-16 00:57:17
言語 PHP
(7.2.24)
結果
AC  
実行時間 14 ms / 1,000 ms
コード長 161 bytes
コンパイル時間 37 ms
使用メモリ 19,212 KB
最終ジャッジ日時 2023-02-17 11:19:38
合計ジャッジ時間 1,158 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 14 ms
18,848 KB
testcase_01 AC 14 ms
19,136 KB
testcase_02 AC 14 ms
19,072 KB
testcase_03 AC 14 ms
19,212 KB
testcase_04 AC 14 ms
18,888 KB
testcase_05 AC 14 ms
19,080 KB
testcase_06 AC 14 ms
19,064 KB
testcase_07 AC 14 ms
18,960 KB
testcase_08 AC 14 ms
19,120 KB
testcase_09 AC 14 ms
19,072 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