判断一个日期是第几天
摘要: #include
int main()
{
int a,b,c;
int day[12]={31,28,31,30,31,30,31,3……
1246库函数解法(Python)
摘要:解题思路:注意事项:太晚了,先睡了,想起来了再写吧参考代码:from datetime import datetimeimport sysfor line in sys.stdin: line ……
#C++1246——第几天
摘要:参考代码:#include <iostream>
using namespace std;
int arr[12]={31,28,31,30,31,30,31,31,30,31,30,31};
……
编写题解 1246: 第几天
摘要:解题思路:注意事项:参考代码:def isy(st):
if st%100==0:
if st%400==0:
return 1
&
编写题解 1246: 第几天 不考虑润年答案也对?
摘要:解题思路:正常的累加注意事项:参考代码:#include<stdio.h>
int main()
{int a,b,c,sum,d;
char i,j;
while(scanf("%d%c%d……
输入年月日,输出这是今年的第几天
摘要:解题思路:1,多组数据输入,用一个while循环。2.定义一个数组,把一年每个月的天数放进去。3,再使用个while循环实现天数的累加。4,输出注意事项:定义的i=0,所以小于月份建议,不然就会多加一……
不是很好的方法(Python)
摘要:YMD=[0,31,28,31,30,31,30,31,31,30,31,30,31]def runnian(Y1): if Y1%100==0: return 1 else……