將輸入的每個字都以此k值做加減即可得解。
P.S. k值為7
[C++](6ms, 730KB)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
const int k = 7; | |
string s; | |
while( getline( cin, s ) ) | |
{ | |
for( int i = 0 ; i < s.length() ; i++ ) | |
s[i] -= 7; | |
cout << s << endl; | |
} | |
return 0; | |
} |
2 意見:
你忘記用k哩~~
噗!!XDDDDDD
感謝發現XDDDD
就當做是讓大家比較好看到答案吧~~(爆)XDDDDD
張貼留言