結果

問題 No.423 ハムスター語初級(数詞)
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-17 17:19:17
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 310 bytes
コンパイル時間 2,697 ms
コンパイル使用メモリ 72,472 KB
実行使用メモリ 56,164 KB
最終ジャッジ日時 2023-09-06 17:49:24
合計ジャッジ時間 4,510 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
55,440 KB
testcase_01 AC 101 ms
55,668 KB
testcase_02 AC 104 ms
56,084 KB
testcase_03 AC 105 ms
55,884 KB
testcase_04 AC 105 ms
55,788 KB
testcase_05 WA -
testcase_06 AC 110 ms
55,664 KB
testcase_07 AC 98 ms
55,808 KB
testcase_08 AC 100 ms
55,848 KB
testcase_09 AC 102 ms
56,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		String s = sc.next();
		s = s.replace("hamu","1");
		s = s.replace("ham","0");
		s = s + "0";
		s = s.replace("1","hamu");
		s = s.replace("0","ham");
		System.out.println(s);
	}
}
0