Check if The Number is Fascinating Problem
Check if The Number is Fascinating Problem — ExecCode Easy DSA Practice
Solve the Check if The Number is Fascinating problem on ExecCode. Free online easy DSA practice in Hashing. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given an integer n that consists of exactly 3 digits. Your task is to compute the required answer and return true if n is fascinating, or false otherwise. We call the number n fascinating if, after the following modification, the resulting number contains all the digits from 1 to 9 exactly once and does not contain any 0's: - Concatenate n with the numbers 2 n and 3 n. Concatenating two numbers means joining them together. For example, the concatenation of 121 and 371 is 121371.
Examples
Input {"n": 192}; Output True. Input {"n": 100}; Output False
Constraints
100 <= n <= 999
Practice Check if The Number is Fascinating free on ExecCode. Browse DSA problems, topic map, and placement guides.