题解列表

筛选

[编程入门]数字逆序输出

摘要:解题思路:注意事项:参考代码:Scanner sc = new Scanner(System.in); int[] arr = new int[10]; for (int i = 0; i < a……

2897: 神奇的幻方

摘要:解题思路:注意事项:参考代码:#include <stdlib.h> #include <stdio.h> #include <iostream> using namespace std; ……

石头剪刀布

摘要:解题思路:小A和小B的出拳是有周期性的。i % A 和 i % B 的作用是计算当前轮次 i 所对应的出拳规律的位置。当i达到或超过 A 或 B 时,取余操作会使其回到0。例如:如果 i 为 3,而 ……

C语言训练-阶乘和数*

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; const int N = 10; int a[N]; int main() {……

1157: 亲和数(C++)

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n; cin >> n; while(……

1159: 偶数求和

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n, m; while(cin >> n ……