Speed6
Retired '16
- Joined
- Jul 31, 2014
- Messages
- 2,949
- Gender
- Male
- HSC
- N/A
Trapizyzz.No. Integration.
Trapizyzz.No. Integration.
This sounds way too much like "are you a gun at maths, and if yes, which gun are you?"Are you a gun at maths? If yes which one? And which topics do you like the most?
I was expecting him to say something along the lines of 'Yes, MX2, Mechanics'.This sounds way too much like "are you a gun at maths, and if yes, which gun are you?"
I'll be somewhere in the bottom of this exam.Trapizyzz.
Do your best, there's nothing wrong with having a goI'll be somewhere in the bottom of this exam.
Rail gun life is engineering life.This sounds way too much like "are you a gun at engineering, and if yes, which gun are you?"
can we write a computer program to do it?Hope carrot doesn't mind me doing this.
We know how much carrot loves putting in questions which have very elegant and quick solutions. So here is a question which has a very elegant and quick solution in preparation for tomorrow's exam. I'll rep if anyone finds the shortest possible solution:
For example take the number 6547, it becomes 6+5+4+7=22, 21 becomes 2+1=3, etc.
You can try, maths will still be faster.can we write a computer program to do it?
alright; I'll write it in CYou can try, maths will still be faster.
It would be pretty easy to set a for loop to count it all up haha.can we write a computer program to do it?
This. In the end the computer will do a million times more calculations than you need to as a human. Think about all those poor electrons!You can try, maths will still be faster.
Not sure if correct tho:Hope carrot doesn't mind me doing this.
We know how much carrot loves putting in questions which have very elegant and quick solutions. So here is a question which has a very elegant and quick solution in preparation for tomorrow's exam. I'll rep if anyone finds the shortest possible solution:
For example take the number 6547, it becomes 6+5+4+7=22, 21 becomes 2+1=3, etc.
lol electrons are working very hard.It would be pretty easy to set a for loop to count it all up haha.
This. In the end the computer will do a million times more calculations than you need to as a human. Think about all those poor electrons!
he said digits, so the latter.alright; I'll write it in C
do you mean like
1 + 2 + 3 + 4 + ... + 321 + 322 + ... + 1,000,000
becomes
1 + 2 + 3 + 4 + ... + 3+ 2 + 1 + 3 + 2 + 2 + ... + 1 + 0 +...
?
Exactly.alright; I'll write it in C
do you mean like
1 + 2 + 3 + 4 + ... + 321 + 322 + ... + 1,000,000
becomes
1 + 2 + 3 + 4 + ... + 3+ 2 + 1 + 3 + 2 + 2 + ... + 1 + 0 +...
?
That works, but there is a faster method.Not sure if correct tho:
Consider 1 digit numbers. Sum is 1+2+3+...9
Consider 2 digit numbers. Sum is 9(1+2+....+9) + 9(1+2+3+...+9) (due to the two digits)
etc
then add the sum of all these?
I get a really big number that doesn't look right; I suspect it is a data overflow. what is the number around?This. In the end the computer will do a million times more calculations than you need to as a human. Think about all those poor electrons!
soz; no engrish/10he said digits, so the latter.
Answer is 27000001 iirc.I get a really big number that doesn't look right; I suspect it is a data overflow. what is the number around?
soz; no engrish/10
but yeah assumed the latter
Imagine writing all these numbers on top of each other, in columns, the 'units' column (the far right), every 10'th number is the same, so you have continuing cycles of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9Hope carrot doesn't mind me doing this.
We know how much carrot loves putting in questions which have very elegant and quick solutions. So here is a question which has a very elegant and quick solution in preparation for tomorrow's exam. I'll rep if anyone finds the shortest possible solution:
For example take the number 6547, it becomes 6+5+4+7=22, 21 becomes 2+1=3, etc.
spoiler alert m9; I am trying to code itImagine writing all these numbers on top of each other, in columns, the 'units' column (the far right), every 10'th number is the same, so you have continuing cycles of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
So in this column, the sum is
The next column, the 'tens' column, has each digit appear in groups of 10 and cycles through all the digits, meaning the sum is:
which is just the same as the first sum
Similar arguments nets us the fact that all the sums for all the columns are the same
So the answer is
Every number can be put into the notation of: This will do for all numbers from 0 to 1 000 000