結果

問題 No.423 ハムスター語初級(数詞)
ユーザー yuma_shobon1108yuma_shobon1108
提出日時 2016-12-03 21:39:24
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 360 bytes
コンパイル時間 2,058 ms
コンパイル使用メモリ 72,560 KB
実行使用メモリ 56,376 KB
最終ジャッジ日時 2023-08-18 10:27:02
合計ジャッジ時間 4,132 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
56,376 KB
testcase_01 AC 114 ms
55,684 KB
testcase_02 AC 115 ms
55,528 KB
testcase_03 AC 117 ms
55,924 KB
testcase_04 AC 117 ms
56,076 KB
testcase_05 WA -
testcase_06 AC 121 ms
56,132 KB
testcase_07 AC 118 ms
55,864 KB
testcase_08 AC 120 ms
55,688 KB
testcase_09 AC 118 ms
56,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Question423
{
	public static void main(String[] str){
		
		Scanner scan = new Scanner(System.in);
		
		String s = scan.next();
		String bin,ham;
		bin = s.replaceAll("hamu","1");
		bin = bin.replaceAll("ham","0");
		bin += "0";
		
		ham = bin.replaceAll("0","ham");
		ham = ham.replaceAll("1","hamu");
		System.out.println(ham);
	}
}
0