HJ11 数字颠倒
题目:https://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe?tpId=37&tqId=21234&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D37&difficulty=undefined&judgeStatus=undefined&tags=&title=
过于简单了= =
1 #include<bits/stdc++.h> 2 using namespace std; 3 char s[200]; 4 int l; 5 int main(){ 6 cin>>s; 7 l=strlen(s); 8 for(int i=l-1;i>=0;i--)printf("%c",s[i]); 9 return 0; 10 }
HJ12 字符串反转
题目:https://www.nowcoder.com/practice/e45e078701ab4e4cb49393ae30f1bb04?tpId=37&tqId=21235&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D37&difficulty=undefined&judgeStatus=undefined&tags=&title=
就上面这个题把范围改大一点就能交了= =
1 #include<bits/stdc++.h> 2 using namespace std; 3 char s[1100]; 4 int l; 5 int main(){ 6 cin>>s; 7 l=strlen(s); 8 for(int i=l-1;i>=0;i--)printf("%c",s[i]); 9 return 0; 10 }
标签:HJ11,exam,试题库,int,undefined,oj,HJ20,ta From: https://www.cnblogs.com/AlenaNuna/p/18400336