2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

「CodeIQ 2周年!」をIntercalで出力

Last updated at Posted at 2014-06-24
言語 CodeIQ 2周年おめでとうございます。
Brainf**k http://ideone.com/xwXeFp
https://github.com/cielavenir/codeiq_solutions/blob/master/q835/death2_bf.c
Intercal http://ideone.com/JbAqfF
http://qiita.com/cielavenir/items/0c9720f7df6d796a547a
Lazy K http://melpon.org/wandbox/permlink/kZSCbtHgnGnHxHeE
http://qiita.com/cielavenir/items/f4428c6a2aefbf8af532
Unlambda http://ideone.com/vQ1EQE
https://github.com/cielavenir/codeiq_solutions/blob/master/codeiq2nd_unlambda.rb
WhiteSpace http://ideone.com/VrQVsv
http://qiita.com/cielavenir/items/ebca62f3e689c049ac24
codeiq2nd_intercal.rb
#!/usr/bin/ruby
#coding:utf-8

STR="CodeIQ 2周年!\n"
last=0
siz=STR.bytes.to_a.size
please=(siz+3)/4-2
puts "DO ,1 <- ##{siz}"
STR.each_byte.with_index{|e,i|
	c = e
	c = (c & 0x55) << 1 | (c & 0xaa) >> 1
	c = (c & 0x33) << 2 | (c & 0xcc) >> 2
	c = (c & 0x0f) << 4 | (c & 0xf0) >> 4
	last2 = c
	c = (last-c)&0xff
	last = last2
	print 'PLEASE ' if i<=please
	puts "DO ,1 SUB ##{i+1} <- ##{c&0xff}"
}
puts 'PLEASE READ OUT ,1'
puts 'PLEASE GIVE UP'

__END__
[cesspool.c]
unsigned int lastout = 0;
c = lastout - a[i];
lastout = c;
c = (c & 0x0f) << 4 | (c & 0xf0) >> 4;
c = (c & 0x33) << 2 | (c & 0xcc) >> 2;
c = (c & 0x55) << 1 | (c & 0xaa) >> 1;
putchar(c);
codeiq2nd_intercal.i
DO ,1 <- #20
PLEASE DO ,1 SUB #1 <- #62
PLEASE DO ,1 SUB #2 <- #204
PLEASE DO ,1 SUB #3 <- #208
PLEASE DO ,1 SUB #4 <- #128
DO ,1 SUB #5 <- #20
DO ,1 SUB #6 <- #8
DO ,1 SUB #7 <- #134
DO ,1 SUB #8 <- #13
DO ,1 SUB #9 <- #186
DO ,1 SUB #10 <- #244
DO ,1 SUB #11 <- #162
DO ,1 SUB #12 <- #30
DO ,1 SUB #13 <- #116
DO ,1 SUB #14 <- #110
DO ,1 SUB #15 <- #10
DO ,1 SUB #16 <- #112
DO ,1 SUB #17 <- #54
DO ,1 SUB #18 <- #186
DO ,1 SUB #19 <- #188
DO ,1 SUB #20 <- #49
PLEASE READ OUT ,1
PLEASE GIVE UP
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?