n=1 require'date'f=->{d=Date.today (s=d.strftime('%Y%m%d').to_ireturn s if s%n<1d-=1)while d.year>0-1} n=4puts f[] n=7puts f[] n=90000puts f[]
Standard input is empty
20140728 20140729 -1
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!