結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー aya
提出日時 2019-08-06 13:51:34
言語 PHP
(843.2)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 461 ms
コンパイル使用メモリ 32,148 KB
実行使用メモリ 32,656 KB
最終ジャッジ日時 2024-07-18 13:54:51
合計ジャッジ時間 1,979 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?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);
      }
  }
}


echo $ans;
0