#include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> // This program works well in linux // or use gcc compiler int main(int c, char **v) { /*fork is used to create a child process and make the process to sleep for given milli seconds and atlast the process with minimum sleep get printed using this we can sort the array Note: This is fun program cannot be used in productive environment Time complexity is high for big numbers */ while (--c > 1 && !fork()); sleep(c = atoi(v[c])); wait(0); return 0; }
Codefest is online CTF challenge conducted by Hackerrank on August 31 2018 6:00 PM IST to September 1 2018 12:00 PM IST. They have given dozens of challenges. link: https://www.hackerrank.com/contests/codefest-ctf-18/challenges I manage to complete two challenges in this article i will explain how i solved the two Typing Master Question If you think you have it in you, connect now to 34.216.132.109 9093 and prove your mettle. You will be presented with a simple typing task which is meant to check your typing speed. For example, Can you type 'Z' 10 times followed by 'u' 6 times, followed by the sum of their ASCII values? ZZZZZZZZZZuuuuuu207 Input Format Regarding input to the server - The question was designed keeping netcat in mind. Some users who are using other tools/language (eg, Python, PuTTY, TELNET) to connect to the server please note that they do not terminate the strings like netcat does. If you choose not to use netcat, t...
Comments
Post a Comment