[编程入门]结构体之时间设计-题解(Python代码) 解题思路:注意事项:参考代码:year,mouth,day=map(int,input().split())list1=[31,28,31,30,31,30,31,31,30,31,30,31]ifyear%400==0or(year%4==0andyear%100!=0):list1[1]=29pr 题解列表 2023年11月04日 1 点赞 0 评论 650 浏览 评分:9.9
巨大的数(因为只需要求个位,那每次的乘积只保留个位就行) 摘要:参考代码: ```c #include int main() { int n; scanf("%d",&n); long long sum=1;//不用在意long long 这是…… 题解列表 2023年11月04日 0 点赞 0 评论 544 浏览 评分:0.0
自定义函数并用数组解菲波那契数列 摘要:解题思路:1.定义函数2.数组注意事项:参考代码:#include <stdio.h> int add(int n) { // 创建一个数组用于存储菲波那契数列 int arr…… 题解列表 2023年11月03日 0 点赞 0 评论 797 浏览 评分:9.3
1095: The 3n + 1 problem 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f(int n){ int i=1; while(n!=1) { if(n%2==0) n=n/2; else …… 题解列表 2023年11月03日 0 点赞 0 评论 375 浏览 评分:0.0
1094: 字符串的输入输出处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i; scanf("%d",&i); getchar(); char a[100]; for(i…… 题解列表 2023年11月03日 0 点赞 0 评论 496 浏览 评分:0.0
1014: [编程入门]阶乘求和 解题思路:1.首先,在程序开头包含了2.在主函数main()中,定义了变量n、i、j,分别用来保存输入的整数、循环计数的变量。3.定义了变量ret和sum,分别用来保存每个阶乘结果和阶乘求和的结果。4.使用scanf()函数从标准输入中读取一个长整型数,保存到变量n中。 题解列表 2023年11月03日 0 点赞 0 评论 605 浏览 评分:9.9
A+B python题解 解题思路:注意事项:参考代码:a,b=map(int,input().split())print(a+b)//说什么内容字数太少,本来以为会考什么数字太长需要用到数组啥的,没想到这么简单 题解列表 2023年11月03日 0 点赞 0 评论 1062 浏览 评分:9.9
最小绝对值 数组 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,max,min;//最大和最小数的下标 int arr[10];//求完绝对值的数组 int arr…… 题解列表 2023年11月03日 0 点赞 0 评论 662 浏览 评分:0.0
C语言 自定义函数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>double fact(int n)//计算n的阶乘{ double m = 1.0; for (int i = 1; i <= n; …… 题解列表 2023年11月03日 0 点赞 0 评论 474 浏览 评分:0.0
自由下落的距离计算 摘要:解题思路:因为第一次和其他不一样把第一次拿出来算,然后求反弹的距离,反弹的距离就是落下的距离注意事项:这个有不足的地方,没有报错的情况参考代码:#include<stdio.h>int main(){…… 题解列表 2023年11月03日 0 点赞 0 评论 600 浏览 评分:0.0