Set 100Question 49

Ayesha's Difference Checker

Very easyWritten in CMust finish in 2 seconds

At a delivery service, Ayesha needs to find the absolute difference between two recorded values to flag data-entry errors.

What your program reads

Two integers A B.

What your program prints

|A - B|.

Limits

-10^6 ≤ A,B ≤ 10^6

Example input

836 71

Expected output

765
main.c

Your work is saved in this browser as you type.

Loading editor…
Input for Run

Run tries your code on the input above and shows what it prints. Submit checks your output against every test, including hidden ones.

Shortcut: Ctrl + Enter sends it to the judge.

Ayesha's Difference Checker · DIU ContestHub