005: solve in C
00{3,7}: use long instead of long long
update table