题解列表
方法论(买不到的数目,想不到的公式)
摘要:解题思路:就是简单记录一下这道真题和这个公式{x*y-x-y}注意事项: 注意此公式的前提是,两数不是全偶也不是全奇。参考代码: #include<……
九宫重排【Python】【BFS+降维+hash判重】
摘要:```python
from collections import deque
from typing import List
direct = [3, -3, -1, 1]
def chec……
利用getline()和istringstream()解决字符串读入空格问题
摘要: #include
#include //STL中的set
#include
using namespace std;
int main()
……
编写题解 1152: C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m)
摘要:解题思路:注意事项:参考代码:#include<iostream>#include <iomanip>#include<math.h>using namespace std;int main(){ ……
编写题解 1151: C语言训练-计算一个整数N的阶乘
摘要:解题思路:注意事项:参考代码:#include<iostream>#include <iomanip>using namespace std;int main(){ int n; int ……
编写题解 1150: C语言训练-计算t=1+1/2+1/3+...+1/n
摘要:解题思路:注意事项:参考代码:#include
#include
using namespace std;
int main()
{
int n;
double sum =……
编写题解 1149: C语言训练-计算1~N之间所有奇数之和
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; int sum =0; cin>>n;……
数字的处理与判断(C语言)
摘要:解题思路:先尝试把每一位数分离出来,剩下就容易了注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,d,e,n,place; scanf("%d",&n)……
有手就行之Sn的公式求和
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int n,a=2,i,s=2; scanf("%d",&n); for(i=1; i<n; i++) { ……