Talk:Minimum positive multiple in base 10 using only 0 and 1: Difference between revisions

m
Line 53:
count=0;
for(ten=1,x=1;x<=n1;x++){
//ten == (10^x-1)%num
val[x]=ten;
int mod = ten;
for(j=0;j<n1;j++){
if(pow[j]&&pow[j]!=x&&!pow[mod]){
if (! pow[mod])=x;}
pow[mod]=x;
}
mod++;
if(mod==num)mod =0;
mod pow[mod]=x0;
}
if(!pow[ten])pow[ten]=x;
pow[ten]=(10*ten)%numx;
ten=(10*ten)%num;
 
if(pow[0])
break;
Line 97:
 
:I've added a reference "How to find Minimum Positive Multiple in base 10 using only 0 and 1" which I think helps.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 13:49, 3 March 2020 (UTC)
:Thanks, that helps allot --[[User Horst.h|Horst.h]] 14:09, 3 March 2020 (UTC)
 
== general observations ==
Anonymous user