Z
Z
ZIK13372020-05-01 10:27:29
Algorithms
ZIK1337, 2020-05-01 10:27:29

How to check the parity of a quaternary number?

The task of compiling NAM

A = {0,1,2,3}. Considering a non-empty word as a quaternary number, check whether it is even or not.
Answer: word 0 if even, and word 1 otherwise.

I can not understand, on what basis to determine parity?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2020-05-01
@ZIK1337

Whether the lowest digit is divisible by 2 - the last digit is 0 or 2, then even.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question