25 lines
626 B
Rust
25 lines
626 B
Rust
use std::io::{Read, Write};
|
|
|
|
fn main() {
|
|
let mut input = String::new();
|
|
let mut stdin = std::io::stdin();
|
|
let mut stdout = std::io::stdout();
|
|
|
|
stdin.read_to_string(&mut input).unwrap();
|
|
|
|
stdout
|
|
.write_all(match input.as_bytes() {
|
|
b"true" => b"false",
|
|
b"True" => b"False",
|
|
b"TRUE" => b"FALSE",
|
|
b"false" => b"true",
|
|
b"False" => b"True",
|
|
b"FALSE" => b"TRUE",
|
|
b"1" => b"0",
|
|
b"yes" => b"no",
|
|
b"0" => b"1",
|
|
b"no" => b"yes",
|
|
other => other,
|
|
})
|
|
.unwrap();
|
|
}
|