Created
September 19, 2013 11:26
-
-
Save hyuki0000/6622058 to your computer and use it in GitHub Desktop.
CodeIQ で @cielavenir 氏が出題した「リテラルを使わずにHello Worldを出力せよ」という問題への結城浩の解答です。評価5をいただきました。ありがとうございます。
https://codeiq.jp/ace/cielavenir/q431
https://github.com/cielavenir/codeiq_problems/tree/master/q431
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hello {} | |
class World {} | |
class Main { | |
public static void main(String[] args) { | |
String h = Hello.class.getName(), w = World.class.getName(); | |
System.out.println(h + (char)(h.length() / h.length() << w.length()) + w); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
一番苦労したのはスペース一文字を作るところでした……