Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rest (r:int, b:int) =
- if (r<0 && b>0) then System.Console.WriteLine(r+b)
- elif (r<0 && b<0) then System.Console.WriteLine(r-b)
- else System.Console.WriteLine(r)
- let main() =
- seq { for i in 1 .. stdin.ReadLine()|> int do yield stdin.ReadLine() }
- |> Seq.iter (fun x -> rest((x.Split(" ").[0]|>int)%(x.Split(" ").[1]|>int), (x.Split(" ").[1]|>int)))
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement