题解 2849: 石头剪子布

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

字符串--4.石头剪刀布

摘要:解题思路: 用空格分离字符,想到用scanf("%s %s",a,b);注意事项:参考代码:#include<stdio.h> #include<string.h> int main() { ……

2849: 石头剪子布

摘要:```cpp #include using namespace std; int main() { int N; cin>>N; string str1,str2……

石头剪子布,硬解(doge)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    int n;    char a[10],b[10];    scan……
优质题解

石头剪子布(分解String)

摘要:解题思路:注意事项:问:为什么playgame函数必须加上static?答:`playGame` 函数在这里被声明为 `static`,是因为它被直接从 `main` 方法内部调用,而 `main` ……

编写题解 2849: 石头剪子布

摘要:解题思路:注意事项:参考代码:ls=["Rock", "Scissors", "Paper"] #选择 def judge(S1,S2):     if S1==S2: #平局         ……

我是硬解的废物

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    int n,p1=0,p2=0;    char s1[10],s2[……

2849: 石头剪子布

摘要:``` #include using namespace std; const int N=110; int main(){ int T; cin>>T; while(T--){ ……

rock,scissors and paper

摘要:解题思路:这里根据3个string长度不同 就直接用int标记 封装一个判断函数 函数判断就三种结果 要么前面赢(8,5;4,8,;5,4;) 要不后面赢(这里复制一下就好了) 要不平局(s1.siz……

石头剪刀布硬解

摘要:解题思路:利用字符串的首元素字母,即是数组的首个元素注意事项:一局比完直接出结果,不是那种全部比完才输出参考代码:#include<stdio.h>#include<string.h>#include……