Tap here to switch tabs
Problem
Submissions

Problem: Count No-Zero Pairs That Sum to N

Count No-Zero Pairs That Sum to N asks you to count pairs of positive integers adding to a given number, with neither number containing the digit zero.

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

Count No-Zero Pairs That Sum to N asks you to count pairs of positive integers adding to a given number, with neither number containing the digit zero.

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}