提交 8c46e92b 编写于 作者: Cxk_666's avatar Cxk_666

第四天、第五天日常report

上级 385d90e4
### 完成实验环境搭建
(由于是在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<Utc>) -> DateTime<Utc> {
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))
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册