solve codeforces 483B
solve hdu5074