题解列表

筛选

链表报数问题 C++,stl-list

摘要:解题思路:有n个人围成一圈,顺序从1开始排号。从第1个人开始报数(从1到3报数),凡报到3的人退出圈子,(之后再从一数到三),问最后留下的是原来第几号的那位。要求用循环链表实现。这里的想法和题目中描述……

6666666666阿萨德

摘要:解题思路:注意事项:参考代码:// ConsoleApplication1.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>#i……

简单代码易理解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ printf("  *  \n"); printf(" * * \n"); printf("*****\n")……

简单代码易理解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ float a,b; scanf("%f",&a); b=50+0.4*a; printf("%.1f",b)……

简单代码易理解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b,C,S; scanf("%d %d",&a,&b); printf("C:%d\nS:%d",……

简单代码易理解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); printf("%d",a*a+b*b); re……