結果

問題 No.423 ハムスター語初級(数詞)
ユーザー bluemeganebluemegane
提出日時 2018-09-16 17:09:45
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 384 bytes
コンパイル時間 2,994 ms
コンパイル使用メモリ 102,400 KB
実行使用メモリ 22,584 KB
最終ジャッジ日時 2023-09-25 09:02:00
合計ジャッジ時間 4,537 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,756 KB
testcase_01 AC 55 ms
18,664 KB
testcase_02 AC 55 ms
22,508 KB
testcase_03 AC 56 ms
22,540 KB
testcase_04 AC 53 ms
18,688 KB
testcase_05 AC 54 ms
20,532 KB
testcase_06 AC 54 ms
22,584 KB
testcase_07 AC 55 ms
20,548 KB
testcase_08 AC 55 ms
20,472 KB
testcase_09 AC 55 ms
20,468 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var s = Console.ReadLine().Trim();
        s = s.Replace("hamu", "1");
        s = s.Replace("ham", "0");
        var a = Convert.ToInt32(s, 2) * 2;
        var s2 = Convert.ToString(a, 2);
        s2 = s2.Replace("1", "hamu");
        s2 = s2.Replace("0", "ham");
        Console.WriteLine(s2);
    }
}
0