結果

問題 No.423 ハムスター語初級(数詞)
ユーザー swdamdrswdamdr
提出日時 2017-01-26 14:22:58
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 452 bytes
コンパイル時間 1,798 ms
コンパイル使用メモリ 104,524 KB
実行使用メモリ 22,640 KB
最終ジャッジ日時 2023-08-25 00:00:32
合計ジャッジ時間 3,026 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
22,640 KB
testcase_01 AC 53 ms
20,504 KB
testcase_02 AC 52 ms
20,484 KB
testcase_03 AC 52 ms
20,588 KB
testcase_04 AC 52 ms
20,568 KB
testcase_05 AC 53 ms
18,396 KB
testcase_06 AC 52 ms
20,504 KB
testcase_07 AC 53 ms
22,476 KB
testcase_08 AC 53 ms
20,600 KB
testcase_09 AC 52 ms
20,476 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        string s = Console.ReadLine();
        s = s.Replace("hamu", "1");
        s = s.Replace("ham", "0");

        int a = Convert.ToInt32(s, 2) * 2;
        s = Convert.ToString(a, 2);

        s = s.Replace("1", "hamu");
        s = s.Replace("0", "ham");

        Console.WriteLine(s);
        Console.Read();
    }
}

0