結果
| 問題 | No.756 チャンパーノウン定数 (1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-06 13:52:19 |
| 言語 | PHP (8.5.4) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 2,000 ms |
| コード長 | 428 bytes |
| 記録 | |
| コンパイル時間 | 105 ms |
| コンパイル使用メモリ | 36,836 KB |
| 実行使用メモリ | 73,944 KB |
| 最終ジャッジ日時 | 2026-04-02 07:18:38 |
| 合計ジャッジ時間 | 2,333 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$input=str_split(trim(fgets(STDIN)));
$ans;
if(count($input)==1){
$ans=$input[0];
}else if(count($input)==2){
if((int)$input[0]%2==0){
if((int)$input[1]%2==0){
$ans=ceil((int)$input[0]/2);
}else{
$ans=5+floor($input[1]/2);
}
}else{
if((int)$input[1]%2==0){
$ans=ceil((int)$input[0]/2);
}else{
$ans=0+floor($input[1]/2);
}
}
}else{
$ans=5;
}
echo $ans;