Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/funksiya-raqamlari-har-xil

Number with distinct digits

Easy 2000 ms 128 MB 31%
Share

Write a function HasDistinctDigits(x) that returns true if all digits of the positive integer $x$ are different and false otherwise.

Example 1: HasDistinctDigits(1234) → true

Example 2: HasDistinctDigits(1213) → false — the digit $1$ occurs twice.

Write only the function body.

The number 1234 goes into the function HasDistinctDigits, which returns true

Input

One line with a positive integer $x$ — the argument of the function.

Output

The value returned by the function: true or false.

Note

$1 \le x \le 10^{6}$

Examples

Input #1
1234
Output #1
true
Input #2
1213
Output #2
false

Sign in to submit a solution

Signing up is free and takes a minute.