init
This commit is contained in:
6
problems/p48/Cargo.toml
Normal file
6
problems/p48/Cargo.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "p48"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
14
problems/p48/src/main.rs
Normal file
14
problems/p48/src/main.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
fn main() {
|
||||
let modulas = 10u64.pow(10);
|
||||
let mut result = 0;
|
||||
for i in 1..1000 {
|
||||
let mut tmp = 1;
|
||||
for _ in 1..=i {
|
||||
tmp *= i;
|
||||
tmp %= modulas;
|
||||
}
|
||||
result += tmp;
|
||||
result %= modulas;
|
||||
}
|
||||
println!("{result}");
|
||||
}
|
||||
Reference in New Issue
Block a user