Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //usage : 아무 이벤트핸들러에 solve();를 입력
- public string encode_table = "9pMaVs5DxiOPGe8JETXYmg3lbudro6Qk1WLKwyhfnS4Iv0ABtjUCc7RZz2NFHq";
- public int minute = 44;
- public int month = 10;
- public int day = 26;
- public int dayofyear = DateTime.Today.DayOfYear;
- public int hour = 23;
- public void solve()
- {
- encode_table += "KfeROdEILJs5W6D1m4XFtH7YbwgrUConPuqQBcSxT092zljv8yMAGhpZN3akVi";
- encode_table += "8vxekVPpYlsXDAujWoJEingTGf3mCh59LROt6cdUNMb41zH7Kr0yS2BIFZqawQ";
- encode_table += "Hv8VzYa5b1FMGNODW4kwX9L3hK6SqsTtyxoE0Z7fPJIgrCAQiljBuenRcp2dUm";
- encode_table += "fgnCw4HPJRdXKIq31YNDZMS82OjA7eUxpozasVmykiQrTFLW6htGb9B0lEcvu5";
- encode_table += "jxLaZdWYngAfKGNhzTcXQU7Jy9sFbp0eRI1ECrv23PSw846oH5MBVtlDiOqumk";
- encode_table += "U0tnl9bVK4iB2LzZXy7PaCHcAI5pOsSfjgqkr1vuRTFEo8Dxmhw3QGdeJM6WYN";
- encode_table += "gWYN9w4LuPjxJl1MhOkniQy8CBUXr6THaKDctEdb0Imp32VfFZGvAS5ezqsR7o";
- encode_table += "wj3J9fL8QY2kArXKgOEzmSdqHpcMsn1ahGWxCe7yPIlTuDRb6F40oZtiUBvV5=";
- string str = "";
- str = "144 207 93 170 111 25 130 144 21 152 172 -3 113 164 -24 94 117 -25 173 106 77 169 119 15 135 127 9 111 123 -12 109 218 61 155 98 50 199 131 -2 168 205 75 169 164 24 139 116 95 127 113 71 102 141 -18 152 153 28 111 131 74 207 201 -21 174 155 74 138 164 -7 179 215 94 187 142 55 147 99 64 176 117 25 193 177 47 135 111 -5 108 137 -8 132 120"; // chicken
- str = "210 209 22 126 188 29 212 101 24 125 145 -22 180 134 -30 162 107 18 142 210 8 185 95 -23 221 123 54 183 180 39 103 145 57 141 181 56 141 138 -25 124 133"; // egg
- string[] arr = str.Split(' ');
- StringBuilder sb = new StringBuilder();
- int temp = 0;
- for (int i = 0; i < arr.Length; i++)
- {
- temp = sol1(arr[i], i);
- sb.Append(temp + " ");
- }
- MessageBox.Show(esreveR(sol2(sb.ToString())));
- }
- public int sol1(string str, int range)
- {
- int test = int.Parse(str);
- int j = range % 3;
- int i = (4 / 2);
- if (j == 0)
- {
- test -= ((day * i) + (minute * i) - (hour*2));
- }
- else if(j == 1)
- {
- test -= ((month * 3) + (minute * 2) - (hour * j));
- }
- else if(j == 2)
- {
- test -= ((dayofyear - (month * (j * 5)) - (minute * j) - (hour * (i + 4)) - (j * i)));
- }
- return test;
- }
- public string sol2(string str)
- {
- StringBuilder s = new StringBuilder();
- string[] arr = str.Split(' ');
- for (int o = 0; o < arr.Length -1 ; o++)
- {
- int test = int.Parse(arr[o]);
- string str1 = ((test ^ encode_table[o + month]) + " ");
- s.Append((char)int.Parse(str1));
- }
- return s.ToString();
- }
- public static String esreveR(string input)
- {
- var length = input.Length;
- var buffer = new char[length];
- for (var i = 0; i < input.Length; i++)
- {
- buffer[i] = input[(length - i) - 1];
- }
- return new String(buffer);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement