They are not the same.
Hard work is hard because you fail if you don’t work hard. You can’t fail in long work; you just keep going.
Solving any problem is long work. It does not need your dedication and determination while the hard work needs all of those.
No matter how long you work in long work you don’t get the result like you get from hard work.
Hard work is always better than long work.