# How to find a formula?

### How to find a formula?

Backstory:
I install a particular type of Network Attached Storage. If the admin password is forgotten, an override is available. The override is based on the date.

Previously it worked like this;
Today is 17 November 2015; 17 - 11 - 15.
To generate the code you multiply those numbers together, then multiply by 8888; 17*11*15*8888. This gives 24930840. You then take the last 6 digits, and that's what the override password used to be; 930840.

New story;
They have changed the formula. Today is no longer 930840. Today, 17/11/15 (17/11/2015?) is 700924.

What's the new formula? And more importantly, how did you solve it? I don't know how to create a formula that only considers the last 6 digits.
Guest

### Re: How to find the formula?

modular arithmetic ......eg. ((12345678) mod 1000000) = 345678
Guest

### Re: How to find a formula?

You can use modular arithmetic.

leesajohnson

Posts: 208
Joined: Thu Dec 31, 2015 7:11 am
Location: London
Reputation: -33

### Who is online

Users browsing this forum: No registered users and 2 guests