松鼠卡卡
松鼠卡卡
全部文章
题解
归档
标签
去牛客网
登录
/
注册
松鼠卡卡的博客
全部文章
/ 题解
(共4篇)
题解 | #扫雷#
思路简单 #include<iostream> #include<string> using namespace std; int n, m; int x[8] = {-1, 0, 1, -1, 1, -1, 0, 1}; int y[8] = {-1, -1, -1,...
C++
2024-03-02
0
213
题解 | #阶乘计算#
">using namespace std; int fact(int n){//递归求数的阶乘 if(n==0) return 1; else{ return n*fact(n-1); } } int main(){ int n; cin...
C++
2023-12-21
0
149
题解 | #零钱兑换#
本题思路: 先尝试尽量全部换成5元,再尽量全部换成2元,无需考虑1元 ">using namespace std; int main(){ int n; cin>>n; int cnt = 0; int num5 = n/5;//优先换5元最多可换张数 ...
C++
2023-12-21
2
187
题解 | #过山车#
#include<bits/stdc++.h> using namespace std; //函数判断数字有没有位数是5 bool havefive(int n){ while(n){ if(n%10==5) return true; else...
C++
2023-12-20
0
210