You are given a sequence of 4 numbers represented as a string. The sequence follows these conditions:
1st number = (2nd number / 2) - 22nd number = (3rd number / 3) - 33rd number = (4th number / 4) - 4One number in the sequence is missing, and the remaining numbers are given in the string format.
Your task is to find the missing number.
The length of the input string can be as large as 10^5.
A string s representing the sequence, where one of the four numbers is missing.
Print the missing number.
1 ≤ |s| ≤ 10^5
Suppose the sequence is:
8 20 69 292
Check:
20 / 2 - 2 = 8
69 / 3 - 3 = 20
292 / 4 - 4 = 69
So if the input is:
8 20 ? 292
the missing number is:
69
ARM • Pending
Adobe • Pending
Adobe Hackthon 2026 Discussion • Pending
Adobe Hackthon 2026 Discussion • Pending
Adobe Hackthon 2026 Discussion • Pending