0 like 0 dislike
5.3k views

Alex傳送郵件時都會先進行加密處理,加密的方式是每個字元加上某一個整數K(字元一定都在ASCII碼中可列印的範圍內)。

Input

每筆測試資料有1個字串不超過1000個字元。內容會包含"Alex",且中間不會出現換行。

Output

對每一測試資料,請輸出解密後的信件。

Sample Input

Ghdu#Pu1#Doh{/L#dp#zulwlqj#wklv#ohwwhu#wr#lqirup#|rx#wkdw#L#kdyh#wr#wdnh#d#vlfn#ohdyh#iurp#frxuvh#gxh#wr#wkh#ihyhu1#Vruu|#iru#dq|#lqfrqyhqlhqfh#fdxvhg#e|#p|#devhqfh1#L#zrxog#uhylhz#wkh#pdwhuldo#ehiruh#qh{w#frxuvh1#Ihho#iuhh#wr#frqwdfw#ph#li#|rx#qhhg#ixuwkhu#yhulilfdwlrq#iurp#p|#grfwru1#Wkdqn#|rx#iru#|rxu#lpphgldwh#dwwhqwlrq#wr#wklv#pdwwhu1

Sample Output

Dear Mr. Alex,I am writing this letter to inform you that I have to take a sick leave from course due to the fever. Sorry for any inconvenience caused by my absence. I would review the material before next course. Feel free to contact me if you need further verification from my doctor. Thank you for your immediate attention to this matter.

 

[Exercise] Coding (C) - asked in 2016-1 程式設計(一)AC by (18k points)
ID: 20984 - Available when: Unlimited - Due to: Unlimited

reshown by | 5.3k views

28 Answers

0 like 0 dislike
Hidden content!
* ** ** ***** ** **
* * ** ** * * ** *
******** ****** * *



int main(){
** ** * * *** *** * a[1001]={0};
***** * ** ** * ** **** i, j, k;
* **** ***** ** ** * * * * ****** a);


** ** * ** **** ** ** ** = 0; j < 255; j++){
* * * * ** ** ** *** ** * ** * * * ***** * * * = 0; i < strlen(a); i++){
**** * * * *** ******* ** * * *** * **** ***** ** *** ** * *** *** * * *** a[i+1]-j=='l' *** **** ** a[i+2]-j=='e' && a[i+3]-j=='x')
** * * ** * ** ** * * * *** ** * *** *** * ***** * ** ** * * ***** ** * * * *** * *** *** * = j;
** * ** * * ** *** * * ** * **** * * * ***
*** ** ** * ** * *




** ** * * **** * * ** * = 0; i < strlen(a); i++)
*** **** ** * * * * * * * * * *** *** ** * * * a[i]-k);





return 0;

}
answered by (-105 points)
0 like 0 dislike
Hidden content!
****** ** * ** *
* *** *** ** *
** ** * ** ***



int main(){
* * ** * ** * ** *** * * **** a[1001]={0};
*** ***** ** * ** i;
* ** * * *** * ** *** ***** ** ** **** * * a);
* * *** * ** ** * * ** * = 0; i < strlen(a); i++)
* * * * * **** *** * **** * * *** *** ** ** * a[i]-3);





return 0;

}
answered by (-105 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<stdlib.h>

#include<string.h>

#include <ctype.h>

int main(void)

{
* * * **** * * * ** ****
* * * ** ** * * * **** i,k,len;
* ** * * * ** * * ** * * s[1000];
* * * * *** * * ** * * **
** * * ** * ** *** * * ** ** * **
* * ** * ******* * * **
* * * * ** * ***** ** ** * (k=-255;k<255;k++)
* * * * * ****** * **** ***
* ** * ****** * * * ** * ** *** *** * ** * ** * = 0;i < len;i++)
* ***** * ** ** * * * ** * * ** **
* ** * * * * * *** * * * ********* * ***
** ** * **** ** * * *** * ** ** ** *** *

*** ** *** * * ** ** ** ** * ** **** * * ****** ** ** ***** **
**** * *** ** ***** * * ** * * * * ** * ** * ***** *
** ** * *** **** * * **** *
* * ** * * * *** ** * **** ** ** ** * ** *

}
answered by (-124 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.h>



int main()

{
** * * * * **** * a[1000];
* * ** * * ****** * * **** i=0,j,k,l;
*** * * * ** * * ****
* * * ***** **** *** ** * * * *** **

    {
* *** * * * ** **** * * * * *** **
*** ** * * * ** * ** ** ** * ** * *** * *
** * ****** *** ** * ** * ** ***** *** * * * * ** * ** ** ***** ** *
* ** ** *** * ** * * ** * * * ** * * *** **
* *** * * * * ** * * * * * * *** * * * * * ** ** ** ** *** *** **
* ** *** *** ** *** * * * ** * **** * * * * **** *** * *
*** * *** * * * * *** * *** *** ******** *** * * * ** *
* * * ** ** * * ** ** **** * *** *** *

    }
** ****** ** *** * * *********

    {
* ** * *** ** * * * * * * ** ** * *** * * **

    }
** ** * *** ** * * ** *
** ** ** *** * **** ****** 0;

}
answered by (-85 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include * **** ****

#include ** * * ** * *

#include <math.h>

#include ******* ****** ***

#include * * ** *** *****



int main(){
** ** * ** * ** c;
* * * *** *** ** * * *** ****** ** *
** ******* * * * ** * != EOF){
* * ** * ** * **** * * * * ** **** ***** * *** ** ** *** * * * ***
**** * * *** * * * * * **** ** *** * * ****** ** **
***** ************ **
* ** **** * ** * * * * 0;

}
answered by (-216 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include ** ** * *

#include <ctype.h>

#include <math.h>

#include <stdlib.h>

#include <assert.h>



int main(){
* * ** * ******* * * *** c;
**** * ** * * * * *** ** * ** *
**** **** ** * * *** * * != EOF){
* * * * * ** * * * ******* * * ** ** *** * == '#')
** *** * * *** * ** * * ** * * *** * * ** *** *** * * **** * **** ********* ** ");
* * * * * * **** **** ** *** ** ** * * * if(c == '1')
* *** ** * * * **** * * ** * ** * * * * **** * ** ***** * *** * **** ** ** * * *
* * * * * ** ****** *** ** *** ** ** * ** *
** * ** * * *** ** ****** * **** * ** *** *** ** ** * * * *** ** * ** *
**** ** *** * * **** * * *** * ** * * * ** *** *** * * *** ****
* * * ** * *** *
** * ** * * ** * * 0;

}
answered by (-216 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.h>

#include <ctype.h>

#include <string.h>





int main()

{

    char a[5000];

    int i,b=0;
**** ** **** * * * ** * ****** *** *
* **** **** * * ****** *

    {
* * *** * *** * ** ** ** *** *** * * **** ***
* * * ***** ***** *** **** * * *** ** * *
** ******** ** * *** * ** * * ** * ***** *** ****** * *** * *** ** ** * ** * * -7)
* * * * * * * ******** * *** ** ** * * * * *** ** * * ******
*** ******** *** * * ** * * ** ** ** ** * * **** * ** * ** ** * * ** ** ** ** ******* **
* * ** *** * * * **** * * * ** * * * * *** * *** * * ** ** ******** * * *** *
*** ** ** ** * **** ** * *** * ** *** ** ** * * * ** ***** ** * * * ******* ** *** * * * * * ** * * **** * * * *** * * **
** * * * * *** * * * * ******* *** * * **** ****** ** * * ** ** **** ** * ** * ** * * ** *** *** ** *
*** * * ****** * ***** ******* * * ** ***** * * **** *** ********* *** * ** **** * ** **
* * *** * *** * ** ** **** **** * *** * *** ** *** ***** * ** *
* * * *** * * * * * * *** *** * *

    }
**** ** **** * **** ** * * ** *** ***

    {
*** * ** * ** * *** ******* * ** ** ***** *** ** * ** ***** * **

    }
** *** * * * * *** ** ** * *** 0;

}
answered by (-158 points)
0 like 0 dislike
Hidden content!
//

// Created by HoMingJui on 2016/01/5.

//



#include <stdio.h>

#include <stdlib.h>

#include <ctype.h>

#include <math.h>





int main(){

    char a[1000]={'\0'};

    int k=0,i;


* * ** ** *** ** * * ** *** *** * * ***


* * *** * ** ** * * * ****
* * *** * ** * ** * * * * ** * *** * **** ** * * ****
* ** * ***** * * ** * *** ** ** ** * * *** ***** *** * * ** ***** * * *
** *** ** * * * ***** * * * * * * * *** ** ** ** **
* * *** * **** ** ** * * ******** ****** * * * ** *
* * ** * * ** ******* **** * * * ** * * **** ** ** * ** ** * (int)a[i+1]-(int)a[i] == 43){
* * * * ** * ** ***** ** ** * ** ** * * * ** * ** *** ** * * ** * * ** ** * * *** * * * (int)a[i+2]-(int)a[i+1] == -7){
***** ** *** * *** * * * **** * **** ** ** ** * ****** *** * ** ******* * * * * ** ** * * * * * * * *** ** * *** * (int)a[i+3]-(int)a[i+2] == 19){
** *** **** *** ** *** ** * *** ** ** * *** * ** ** * * * * * ** * ****** * * * * ** ***** ** **** *** * ** * **** *** ******** ***** * * ** **** * * **** * ** ** *
***** ** ** * ** * ** * * **** ** * * ** ** ** **** * ** * * * * *** * * * *** ** ** * * ****** * ** * * *
* *** ** *** **** *** * **** * ** * * *** * * ***** *** ** ** ** ** * * * ** ** * * * *
**** * *** * ** ** ***** ** * * *** * * * ** *** * * ** ** * ***
* * *** * ** * * * *** *** **** * * **** *** *

    }
*** *** * ***** * * * *
* * *** ******** * ** ** * * ** *** * * ***
* *** * ** * ************ ** ** ** * * * * * **** * * ** * * ******
*** ******** *** * ****** * * ** **** *
* * **** ***** **** ** ** ** * * * * **** * * *** * **** *** **** **

    }


* * * ** * * *** 0;

}



//65 108 101 120



//-43

//7

//19
answered by (-126 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:104.23.197.64
©2016-2026

Related questions

0 like 0 dislike
3 answers
[Exercise] Essay (Open question) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20995 - Available when: Unlimited - Due to: Unlimited
| 1.4k views
0 like 0 dislike
144 answers
[Exercise] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20993 - Available when: Unlimited - Due to: Unlimited
| 20.7k views
0 like 0 dislike
43 answers
[Exercise] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20980 - Available when: Unlimited - Due to: Unlimited
| 7.6k views
0 like 0 dislike
39 answers
[Exercise] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20978 - Available when: Unlimited - Due to: Unlimited
| 6.4k views
0 like 0 dislike
16 answers
[Exercise] Essay (Open question) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20974 - Available when: Unlimited - Due to: Unlimited
| 4.2k views
12,783 questions
183,442 answers
172,219 comments
4,824 users