(hdu 1048)The Hardest Problem Ever
문자열 물 문제, 관건 은 세심 해 야 한다.WA 가 여러 번...
#include
#include
char mess[300], start[20], end[20];
int main(void)
{
int i;
while (scanf("%s%*c", start) != EOF) {
if (strcmp(start, "ENDOFINPUT") == 0)
break;
if (strcmp(start, "START") == 0) {
gets(mess);
for (i = 0; i < strlen(mess); i++) {
if (mess[i] >= 'A' && mess[i] <= 'Z') {
mess[i] -= 5;
if (mess[i] < 'A')
mess[i] += 26;
}
}
scanf("%s%*c", end);
if (strcmp(end, "END") == 0)
puts(mess);
}
}
return 0;
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
최 장 회 문 (말 라 차 알고리즘)소문 자 영문 문자 a, b, c... y, z 로 만 구 성 된 문자열 S 를 보 여 줍 니 다. S 에서 가장 긴 답장 문자열 의 길 이 를 구 합 니 다. 답문 은 정반 독 이 모두 같은 문자열 이다. 예 를 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.