solutions: 1807A
This commit is contained in:
parent
c50d37dad3
commit
56845981af
1 changed files with 24 additions and 0 deletions
24
solutions/rust/1807A.rs
Normal file
24
solutions/rust/1807A.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
use std::io;
|
||||
|
||||
fn main() {
|
||||
let mut t = String::new();
|
||||
io::stdin().read_line(&mut t).unwrap();
|
||||
|
||||
for _ in 1..=t.trim().parse::<i16>().unwrap() {
|
||||
let mut n = String::new();
|
||||
io::stdin().read_line(&mut n).unwrap();
|
||||
|
||||
let array = n.trim().split_whitespace().collect::<Vec<&str>>();
|
||||
|
||||
let mut int_array: Vec<i8> = vec![];
|
||||
for i in array {
|
||||
int_array.push(i.parse::<i8>().unwrap());
|
||||
}
|
||||
|
||||
if int_array[0] + int_array[1] == int_array[2] {
|
||||
println!("+");
|
||||
} else {
|
||||
println!("-");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue