Created
April 1, 2020 18:44
-
-
Save cranelab/73a6da6c77cd7bd28fa79ee90cf852b2 to your computer and use it in GitHub Desktop.
obfuscated FizzBuzz solution in Golang
This file contains hidden or 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
package main | |
import "fmt" | |
func main() { | |
var 事 uint = 1 | |
左 := 事 << 事 | |
右 := 事 >> 事 | |
あ := []byte{ | |
byte(事<<(事<<(左)+左) + 事<<(左) + 左), | |
byte(事<<(事<<(左+事)-事) - 事<<(事<<(左)+事) + 事<<(左+事) + 事), | |
byte(事<<(事<<(左)+左) + 左), | |
byte(事<<(事<<(左+事)-事) - 事<<(左+事) - 左 - 事), | |
byte(事<<(事<<(左+事)-事) - 事<<(左) - 左), | |
byte(事<<(事<<(左+事)-事) - 事<<(左) - 左), | |
byte(事<<(左+事) + 左), | |
} | |
い := (事<<(事<<(左)+左) + 事<<(事<<(左)+事) - 事<<(左)) + | |
(uint(あ[事<<(左)]) * ((事<<(事<<(左+事)-事) - 事<<(事<<(左)) + 左) + | |
(uint(あ[左+事]) * (事<<(事<<(左)+左) - 事<<(左) - 左 + (uint(あ[左]) * | |
(事 + 事<<(事<<(左)) + 左 + (事 << (左 + 事) * uint(あ[事])))))))) | |
う := [][]byte{ | |
append(append([]byte{}, あ[:左]...), あ[事<<(左):]...), | |
append([]byte{}, あ[左:]...), | |
append(append(append([]byte{}, あ[:左]...), あ[事<<(左):事<<(左)+左]...), あ[左:]...), | |
} | |
え := make([]byte, uint(あ[事<<(左)+左])<<(左)-uint(あ[事<<(左)+左])+uint(あ[右])) | |
for お := range え { | |
が := い & uint(あ[右]-あ[左]-byte(事)) | |
if が < 事 { | |
fmt.Printf("%d%s", uint(お)+事, あ[事<<(左)+左:]) | |
} else { | |
fmt.Printf("%s", う[が-事]) | |
} | |
い = い>>(左) | が<<(事<<(事<<(左)+事)-事<<(左)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment