From 8c46e92b8085d38d97740d12dd31348bfa9b296d Mon Sep 17 00:00:00 2001 From: haozhuoD <2567769508@qq.com> Date: Thu, 8 Jul 2021 02:05:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E5=9B=9B=E5=A4=A9=E3=80=81=E7=AC=AC?= =?UTF-8?q?=E4=BA=94=E5=A4=A9=E6=97=A5=E5=B8=B8report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 7.6and7.7_dailyreport.md | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 7.6and7.7_dailyreport.md diff --git a/7.6and7.7_dailyreport.md b/7.6and7.7_dailyreport.md new file mode 100644 index 0000000..4373593 --- /dev/null +++ b/7.6and7.7_dailyreport.md @@ -0,0 +1,45 @@ +### 完成实验环境搭建 + +(由于是在win10上整,遇到较多挫折,还好全部解决了) + +win10 + wsl2 + docker 桌面版 + + 参考资料与视频: + +[yjc15873496491 / rCore-Tutorial-v3 · CODE CHINA (csdn.net)](https://codechina.csdn.net/yjc15873496491/rcore) + +[02.Demo演示_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1Lb4y1D7Pu) + +[04-运行镜像》rCore-Tutorial-v3 环境搭建和工具链指南_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1FX4y1w792?from=search&seid=7301290385508805990) + + + + + +### 练习代码 + + + +实现返回任意时刻1_000_000_000秒之后的函数,判断是否是闰年。 + +(部分题目已写但是仅是在网站上通过,并未保存,索性找时间把前面的题再做一遍以当巩固) + +今天龙芯杯比赛DDL所有进度被拖慢。 + +```rust +extern crate chrono; +use chrono::{DateTime, Duration, Utc}; + +// Returns a Utc DateTime one billion seconds after start. +pub fn after(start: DateTime) -> DateTime { + return start + Duration::seconds(1_000_000_000); +} +``` + +```rust +pub fn is_leap_year(year: i32) -> bool { + let mut r = |n| year % n == 0; + r(4) && (!r(100) || r(400)) +} +``` + -- GitLab