結果
| 問題 |
No.423 ハムスター語初級(数詞)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-23 09:23:17 |
| 言語 | PHP (843.2) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| コード長 | 255 bytes |
| コンパイル時間 | 2,543 ms |
| コンパイル使用メモリ | 32,148 KB |
| 実行使用メモリ | 32,404 KB |
| 最終ジャッジ日時 | 2024-11-17 17:32:30 |
| 合計ジャッジ時間 | 3,588 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$word = trim(fgets(STDIN));
$word = str_replace("hamu","1", $word);
$word = str_replace("ham","0", $word);
$num = bindec($word) * 2;
$ans = decbin($num);
$ans = str_replace("1", "hamu", $ans);
$ans = str_replace("0", "ham", $ans);
echo $ans.PHP_EOL;