
算法
Pink&Sakura
C、C++、Java、前端
展开
-
查看windows产品密钥
产品密钥原创 2022-10-24 15:15:52 · 1747 阅读 · 2 评论 -
求阶乘1!+2!+3!+...+N!=
求阶乘1!+2!+3!+...+N!=原创 2022-10-18 22:11:04 · 1322 阅读 · 0 评论 -
if,语句的使用,求一个数的绝对值
A dice game描述One day, boy A and girl B are playing a dice game. First, they write a number between 1~6 in a piece of paper, and then roll the dice. The one whose number is closer to the number of the dice will win this game. For example, A wins if |a原创 2022-03-21 19:46:32 · 2028 阅读 · 0 评论 -
算法练习题,删除字符序列中重复的元素,只保留一个
Line up in the canteen描述One day, there is a kind of new delicious food from one of the windows in the canteen. All students want to have a taste. Therefore, they all go to this window to line up and form a sequence. We need to simplify this sequence. F原创 2022-03-20 17:17:52 · 339 阅读 · 0 评论 -
算法题,统计1~n之间,含有某个数字的树共有多少个、计算某个数的位数
1、先来实现计算某个数的位数下面是代码:#include<iostream>using namespace std;int main() { int num = 0; while (cin >> num) { int m = 0; int flag = 1; while (flag) { num = num / 10; m++; if (num == 0) { flag = 0; } } cout <&l原创 2022-03-20 15:06:42 · 504 阅读 · 0 评论