对标 CSP-J/S 2025/2026 考纲

C++ 题库中心

逐字符检测 · 实时反馈 · 涵盖 CSP-J/S 全部知识点

0
全部题目
0
入门
0
基础
0
中档
0
提高
0
真题冲刺
123 道题目
7
请先登录
基础

数组元素求和

数组

#include <iostream> using namespace std; int main() { int arr[100], n, sum = 0; cin >> n; for (int i = 0; i...
9行 2分0秒 数组,求和,遍历
7
请先登录
基础

数组逆序输出

数组

#include <iostream> using namespace std; int main() { int arr[100], n; cin >> n; for (int i = 0; i < n; i++...
10行 2分30秒 数组,逆序,遍历
7
请先登录
基础

数组找最大值及下标

数组

#include <iostream> using namespace std; int main() { int arr[100], n; cin >> n; for (int i = 0; i < n; i++...
11行 2分0秒 数组,最大值,下
8
请先登录
基础

二维数组输入输出

数组

#include <iostream> using namespace std; int main() { int matrix[10][10]; int n, m; cin >> n >> m; for ...
13行 3分0秒 二维数组,矩阵,
8
请先登录
基础

字符串长度统计

字符串处理

#include <iostream> #include <cstring> using namespace std; int main() { char str[100]; cin >> str; int len...
9行 2分0秒 字符数组,str
8
请先登录
基础

矩阵转置

数组

#include <iostream> using namespace std; int main() { int a[10][10], n, m; cin >> n >> m; for (int i = 0; i...
11行 2分30秒 矩阵,转置,行列
9
请先登录
基础

自定义max函数

函数

#include <iostream> using namespace std; int myMax(int x, int y) { if (x > y) return x; else return y; } int m...
12行 2分30秒 函数,自定义,m
10
请先登录
基础

阶乘函数(递归)

函数

#include <iostream> using namespace std; long long factorial(int n) { if (n <= 1) return 1; return n * factoria...
11行 2分30秒 函数,递归,阶乘
9
请先登录
基础

素数判断函数

函数

#include <iostream> using namespace std; bool isPrime(int n) { if (n < 2) return false; for (int i = 2; i * i <...
14行 3分0秒 函数,bool,
10
请先登录
基础

斐波那契数列(递归)

函数

#include <iostream> using namespace std; int fib(int n) { if (n <= 2) return 1; return fib(n - 1) + fib(n - 2);...
9行 2分0秒 递归,斐波那契,
10
请先登录
基础

汉诺塔问题

函数

#include <iostream> using namespace std; void hanoi(int n, char from, char to, char aux) { if (n == 1) { co...
14行 3分0秒 递归,汉诺塔,经
4
请先登录
基础

成绩等级判断

分支结构

#include <iostream> using namespace std; int main() { int score; cin >> score; if (score >= 90) { c...
14行 2分30秒 if,elsei
4
请先登录
基础

switch月份天数

分支结构

#include <iostream> using namespace std; int main() { int month; cin >> month; switch (month) { cas...
16行 3分0秒 switch,月
5
请先登录
基础

1到N求和

循环结构

#include <iostream> using namespace std; int main() { int n, sum = 0; cin >> n; for (int i = 1; i <= n; i++...
8行 2分0秒 for,求和,累
5
请先登录
基础

九九乘法表

循环结构

#include <iostream> using namespace std; int main() { for (int i = 1; i <= 9; i++) { for (int j = 1; j <= i...
7行 3分0秒 for,嵌套循环
5
请先登录
基础

输出1-N之间所有偶数

循环结构

#include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 2; i <= n; i += 2) { ...
7行 1分30秒 for,偶数,步
6
请先登录
基础

while循环求阶乘

循环结构

#include <iostream> using namespace std; int main() { int n; cin >> n; long long fact = 1; int i = 1; ...
10行 2分30秒 while,阶乘
6
请先登录
基础

do-while猜数字

循环结构

#include <iostream> using namespace std; int main() { int secret = 7, guess; do { cin >> guess; ...
10行 2分30秒 do-while
6
请先登录
基础

统计数字位数

循环结构

#include <iostream> using namespace std; int main() { int n, cnt = 0; cin >> n; while (n > 0) { n /...
8行 2分0秒 while,位数
7
请先登录
基础

数组元素求和

数组

#include <iostream> using namespace std; int main() { int arr[100], n, sum = 0; cin >> n; for (int i = 0; i...
9行 2分0秒 数组,求和,遍历
7
请先登录
基础

数组逆序输出

数组

#include <iostream> using namespace std; int main() { int arr[100], n; cin >> n; for (int i = 0; i < n; i++...
10行 2分30秒 数组,逆序,遍历
7
请先登录
基础

数组找最大值及下标

数组

#include <iostream> using namespace std; int main() { int arr[100], n; cin >> n; for (int i = 0; i < n; i++...
11行 2分0秒 数组,最大值,下
8
请先登录
基础

二维数组输入输出

数组

#include <iostream> using namespace std; int main() { int matrix[10][10]; int n, m; cin >> n >> m; for ...
13行 3分0秒 二维数组,矩阵,
8
请先登录
基础

字符串长度统计

字符串处理

#include <iostream> #include <cstring> using namespace std; int main() { char str[100]; cin >> str; int len...
9行 2分0秒 字符数组,str
1 2 3 4 ...6