Submission #3006563
Source Code Expand
use std::io::*; use std::str::FromStr; fn read<T: FromStr>() -> T { let stdin = stdin(); let stdin = stdin.lock(); let token: String = stdin .bytes() .map(|c| c.expect("failed to read char") as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect(); token.parse().ok().expect("failed to parse token") } fn f(n: f64) -> f64 { ((n*n+4.0)/8.0).floor() } #[allow(non_snake_case, unused_variables)] fn main() { println!("{}", f(f(f(20.0)))); }
Submission Info
Submission Time | |
---|---|
Task | A - 天下一合成関数 |
User | semimaru |
Language | Rust (1.15.1) |
Score | 100 |
Code Size | 571 Byte |
Status | AC |
Exec Time | 2 ms |
Memory | 4352 KB |
Compile Error
warning: function is never used: `read`, #[warn(dead_code)] on by default --> ./Main.rs:4:1 | 4 | fn read<T: FromStr>() -> T { | ^
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | no-input |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
no-input | AC | 2 ms | 4352 KB |