+ 1
If I have some string with 10 characters abcdefghij. How can I make this string to long int?
I found somewhere this problem called Digital Perfection. And I tried to solve it by C++. There is a mysterious 10-digit decimal number-abcdefghij. Each of the digits is different, and they have the following properties: -a is divisible by 1 -b is divisible by 2 -c is divisible by 3 and so on until -abcdefghij is divisible by 10. Do you have any idea how to make it?
7 Réponses
+ 4
If e, f, g, h, i are digits, then they have to be 5, 6, 7, 8, 9 respectively as other multiples of 5, 6, 7, 8, 9 take more than 2 digits, unless they are zero. In general we don't say that 0 is divisible by 5 etc. j cannot be purely a digit if it's divisible by 10 as the smallest whole multiple of 10 takes 2 digits and we don't usually say that 0 is a multiple of 10.
+ 3
- a is divisible by 1
But isn't any number divided by 1 becoming the number itself?
When you say divisible, do you mean fully divisible or just divisible?
+ 2
Martin Taylor is spitting facts right there.
+ 1
It is fully divisible so modulus is equal 0.
+ 1
That is a problem, so it must be somehow solved. With any program. Do you agree! The number is only sybolical so that you know it has ten digits. Here I don't know how input the number.
+ 1
In this problem you have to find a number which meets all these conditions. It is told that this number has ten digits and all digits are different that means they don't repeate and maybe it has also zero.
+ 1
Mr Taylor do you agree that every problem must be solved by any program?