+ 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?

12th Jan 2021, 4:41 AM
TeaserCode
13 odpowiedzi
+ 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.
20th Jan 2021, 3:35 AM
Sonic
Sonic - avatar
+ 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?
12th Jan 2021, 6:24 AM
Ipang
+ 2
Martin Taylor is spitting facts right there.
13th Jan 2021, 3:37 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 1
It is fully divisible so modulus is equal 0.
12th Jan 2021, 10:07 AM
TeaserCode
+ 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.
12th Jan 2021, 1:08 PM
TeaserCode
+ 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.
12th Jan 2021, 3:32 PM
TeaserCode
+ 1
Mr Taylor do you agree that every problem must be solved by any program?
13th Jan 2021, 4:41 AM
TeaserCode