修改应用程序, 以满足测试

ch3
zhangxinyu 2 years ago
parent 206edeb6e0
commit 43cd467d9f

@ -10,7 +10,7 @@ const LEN: usize = 100;
fn main() -> i32 {
let p = 3u64;
let m = 998244353u64;
let iter: usize = 200000;
let iter: usize = 20000000;
let mut s = [0u64; LEN];
let mut cur = 0usize;
s[cur] = 1;
@ -18,7 +18,7 @@ fn main() -> i32 {
let next = if cur + 1 == LEN { 0 } else { cur + 1 };
s[next] = s[cur] * p % m;
cur = next;
if i % 10000 == 0 {
if i % 1000000 == 0 {
println!("power_3 [{}/{}]", i, iter);
}
}

@ -10,7 +10,7 @@ const LEN: usize = 100;
fn main() -> i32 {
let p = 5u64;
let m = 998244353u64;
let iter: usize = 140000;
let iter: usize = 14000000;
let mut s = [0u64; LEN];
let mut cur = 0usize;
s[cur] = 1;
@ -18,7 +18,7 @@ fn main() -> i32 {
let next = if cur + 1 == LEN { 0 } else { cur + 1 };
s[next] = s[cur] * p % m;
cur = next;
if i % 10000 == 0 {
if i % 1000000 == 0 {
println!("power_5 [{}/{}]", i, iter);
}
}

@ -10,7 +10,7 @@ const LEN: usize = 100;
fn main() -> i32 {
let p = 7u64;
let m = 998244353u64;
let iter: usize = 160000;
let iter: usize = 16000000;
let mut s = [0u64; LEN];
let mut cur = 0usize;
s[cur] = 1;
@ -18,7 +18,7 @@ fn main() -> i32 {
let next = if cur + 1 == LEN { 0 } else { cur + 1 };
s[next] = s[cur] * p % m;
cur = next;
if i % 10000 == 0 {
if i % 1000000 == 0 {
println!("power_7 [{}/{}]", i, iter);
}
}

@ -0,0 +1,18 @@
#![no_std]
#![no_main]
#[macro_use]
extern crate user_lib;
use user_lib::syscall::{sys_get_time, sys_yield};
#[no_mangle]
fn main() -> i32 {
let current_timer = sys_get_time();
let wait_for = current_timer + 3000;
loop {
}
println!("Test sleep OK!");
0
}
Loading…
Cancel
Save