Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138900 abcdddd 破译邮件 C++ Accepted 0 MS 268 KB 497 2025-11-30 12:04:56

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int i,j,k,n,s; char a[101],b[101]; scanf("%d",&n); while (n--) { scanf("%s",a); i=j=k=s=0; while (i<strlen(a)) { while (a[i]>='0' and a[i]<='9' and j<=1) { s=s*10+a[i]-'0'; j++; i++; } if (j>0) b[k++]=s+64; if (a[i]=='-') i++; if (a[i]=='#') { b[k++]=' '; i++; } j=s=0; } b[k]='\0'; printf("%s\n",b); } return 0; }