Borderou de evaluare (job #3135731)

Utilizator dbnor0Dombi Norbert dbnor0 Data 4 iunie 2023 10:31:14
Problema CMMDC Status done
Runda Arhiva de probleme Compilator rs | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: error[E0308]: mismatched types --> main.rs:29:34 | 29 | [Ok(a), Ok(b)] => Input { a: *a, b: *b }, | ^^ expected `u128`, found `u64` error[E0308]: mismatched types --> main.rs:29:41 | 29 | [Ok(a), Ok(b)] => Input { a: *a, b: *b }, | ^^ expected `u128`, found `u64` error[E0308]: arguments to this function are incorrect --> main.rs:48:20 | 48 | Output { result: cmmdc(input.a, input.b) } | ^^^^^ ------- ------- expected `u64`, found `u128` | | | expected `u64`, found `u128` | note: function defined here --> main.rs:51:4 | 51 | fn cmmdc(a: u64, b: u64) -> u64 { | ^^^^^ ------ ------ help: you can convert a `u128` to a `u64` and panic if the converted value doesn't fit | 48 | Output { result: cmmdc(input.a.try_into().unwrap(), input.b) } | ++++++++++++++++++++ help: you can convert a `u128` to a `u64` and panic if the converted value doesn't fit | 48 | Output { result: cmmdc(input.a, input.b.try_into().unwrap()) } | ++++++++++++++++++++ error[E0308]: mismatched types --> main.rs:48:20 | 48 | Output { result: cmmdc(input.a, input.b) } | ^^^^^^^^^^^^^^^^^^^^^^^ expected `u128`, found `u64` error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0308`. Non zero exit status: 1

Ceva nu functioneaza?