Zum Entspannen ein kleines Rätsel von MindYourDecisions:
ZitatA smartphone uses a four-digit passcode, like 0131.
San wants to reset the passcode such that the new passcode cannot have the digit 1 followed by the digit 3.
How many different passcodes can be formed?
Wie viele vierstellige Passcodes mit den Ziffern 0..9 gibt es, in denen die Zahlenfolge "13" nicht vorkommt?
Spoiler anzeigen
Anzahl aller Zahlen = 10 x 10 x 10 x 10 = 10000
Anzahl 13** = 100
Anzahl *13* = 100
Anzahl **13 = 100
Wert 1313 ist doppelt
Anzahl Zahlen ohne "13" = 10000 - 100 -100 -100 + 1 = 9701
Die Antworten bitte in den Spoiler verstecken. Wenn möglich die Aufgabe im Kopf lösen, ohne Stift und Papier oder Rechner. Sollte es jemand in den Fingern jucken und dazu ein Programm erstellen, dann bitte ebenfalls in den Spoiler.