题解列表

筛选

1147: C语言训练-角谷猜想

摘要:解题思路:循环注意事项:参考代码:#include <iomanip>#define PI 3.14159#include <bits/stdc++.h>using namespace std;int……

Java学习小练习

摘要:解题思路:注意事项:由于c的数据类型是int,最大为2,147,483,647(2^31-1),也就是输入的数不能超过30,要注意.参考代码:import java.util.Scanner;publ……

1143素数问题

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int isprimer(int n){ if (n == 1)//1不是素数 return……

1144自守数问题

摘要:解题思路:这道题给的范围不是很大,所以可以使用 long long 可以存储最后的平方值,我用的是常规思路:先求出它的平方,再求出这个数有几个数字,再从它的平方中提取出来进行比较就行了。注意事项:注意……

1146舍罕王的失算(模拟乘法)

摘要:解题思路:模拟乘法,这道题用求和公式可得是2的64次方-1。注意事项:可以直接输出 18446744073709551615 就可以过,不过没必要参考代码:#include<iostream>usin……

1147角谷猜想(while循环)

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

1148计算1977!*(模拟乘法)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[10000] = { 1 };//从第一个数 1 开始……