Submission
# | When | Author | Problem | Language | CPU | Memory | |
---|---|---|---|---|---|---|---|
20835 | 2024-06-09 09:16:22 | AHAMMED_99 | Akash and Cipher | C | 1 ms | 1456 kb | Runtime Error - 1 |
Source Code
#include <stdio.h> char decrypt_message(int n, char *s, char *q) { char result[n + 1]; result[n] = '\0'; for (int i = 0; i < n; i++) { int shift = (q[i] == 'U') ? (i + 1) : -(i + 1); int char_code = s[i] + shift; if (char_code < 'a') { char_code += 26; } else if (char_code > 'z') { char_code -= 26; } result[i] = char_code; } return *result; } int main() { int T; for (int t = 0; t < T; t++) { int n; char s[n + 1], q[n + 1]; // Decrypt the message and print the result } return 0; }