Last active
August 10, 2020 14:49
-
-
Save BLKKKBVSIK/7b03cc650be21cdafd56b409f80eee3a to your computer and use it in GitHub Desktop.
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
String hello() { | |
List<int> underCode = [1, 8, 11]; | |
List<int> charCodes = []; | |
bool key = false; | |
charCodes.insert(0, 72); | |
for (var i = 0; i < underCode.length; i++) { | |
final r = underCode[i] + 100; | |
if (charCodes.contains(101) && key == false) { | |
List<int> tmpList = []; | |
for (var i = 0; i < 2; i++) { | |
tmpList.add(108); | |
} | |
tmpList.shuffle(); | |
charCodes.addAll(tmpList); | |
key = !key; | |
} else | |
charCodes.add(r); | |
} | |
charCodes.insert(charCodes.length, 32); | |
return String.fromCharCodes(charCodes); | |
} | |
String world() { | |
List<int> charCodes = [100, 108, 114, 111, 87]; | |
for (var i = 0; i < charCodes.length / 2; i++) { | |
var temp = charCodes[i]; | |
charCodes[i] = charCodes[charCodes.length - 1 - i]; | |
charCodes[charCodes.length - 1 - i] = temp; | |
} | |
return String.fromCharCodes(charCodes); | |
} | |
void main() { | |
print(hello() + world()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment