Tap here to switch tabs
Problem
Submissions

Problem: Count No-Zero Pairs That Sum to N

Try to solve the Count No-Zero Pairs That Sum to N problem.

Statement

Given an integer n, return the total number of pairs of positive integers (a, b) such that a + b = n, where neither a nor b contains the digit 00 in its decimal representation.

Constraints:

  • 2≤2 \leq n ≤1015\leq 10^{15}

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count No-Zero Pairs That Sum to N

Try to solve the Count No-Zero Pairs That Sum to N problem.

Statement

Given an integer n, return the total number of pairs of positive integers (a, b) such that a + b = n, where neither a nor b contains the digit 00 in its decimal representation.

Constraints:

  • 2≤2 \leq n ≤1015\leq 10^{15}