Skip to content

Instantly share code, notes, and snippets.

@BLKKKBVSIK
Last active August 10, 2020 14:49
Show Gist options
  • Save BLKKKBVSIK/7b03cc650be21cdafd56b409f80eee3a to your computer and use it in GitHub Desktop.
Save BLKKKBVSIK/7b03cc650be21cdafd56b409f80eee3a to your computer and use it in GitHub Desktop.
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