interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / tests / universal / arithmetic.rs

13 lines · 530 bytes Raw Blame History
1// Independent Rust development oracle; explicit wrapping regardless of build mode.
2use std::io::{self, Read};
3fn main() {
4 let mut input = String::new();
5 io::stdin().read_to_string(&mut input).unwrap();
6 for line in input.lines() {
7 let v: Vec<u64> = line.split_whitespace().map(|s| s.parse().unwrap()).collect();
8 assert_eq!(v.len(), 2);
9 let (a, b) = (v[0], v[1]);
10 assert_ne!(b, 0);
11 println!("{} {} {} {}", a.wrapping_add(b), a.wrapping_sub(b), a.wrapping_mul(b), a / b);
12 }
13}