結果

問題 No.423 ハムスター語初級(数詞)
ユーザー fal_rndfal_rnd
提出日時 2016-10-27 23:59:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 1,905 ms
コンパイル使用メモリ 72,292 KB
実行使用メモリ 56,404 KB
最終ジャッジ日時 2023-08-15 20:27:52
合計ジャッジ時間 3,561 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
55,812 KB
testcase_01 AC 110 ms
56,060 KB
testcase_02 AC 107 ms
55,384 KB
testcase_03 AC 108 ms
56,052 KB
testcase_04 AC 111 ms
55,796 KB
testcase_05 AC 108 ms
56,320 KB
testcase_06 AC 112 ms
56,028 KB
testcase_07 AC 111 ms
56,148 KB
testcase_08 AC 112 ms
56,216 KB
testcase_09 AC 110 ms
56,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class A {
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		String in = s.nextLine().replaceAll("hamu", "1").replaceAll("ham", "0");
		System.out.println(Integer.toBinaryString(Integer.parseInt(in,2)*2).replaceAll("1","hamu").replaceAll("0","ham"));
	}
}
0