I've been interning for Fujitsu Laboratories in Kawasaki, Japan for three months. During my three months I've noticed many interesting things about the Japanese workplace. For those of you who don't know Japanese or are unfamiliar with the Japanese workplace, in Japan it's considered a badge of honor to log very long hours at work. When the shift is over and the end-of-day bell rings (yes, Fujitsu has bells that rings that indicate when a shift begins, the beginning of lunch, the end of lunch, and the end of the day; I don't know if this bell system is standard across Japan), most people do not begin packing; instead they are still working. My work ends at 5:40pm, but I'm usually in the office until 6:00pm-6:30pm on average; I rarely leave at 5:40pm, and the latest I've stayed was 7:30pm when waiting on a coworker to return to a meeting to ask some work-related questions before leaving (but staying this late is very rare for me). And while I leave at about the same time as other people in my group, I'm never the last one to leave the office, although I'd venture and guess that most people are gone by 8:00pm or so at Fujitsu.
Anyway, if you are leaving the office at the end of the day and there are still other people in your group, you say to them 「お先に失礼します’ (osaki ni shitsurei shimasu). It literally means "I'm being rude for leaving before you," but it is the standard greeting for leaving work before other people. When somebody says that to you, you reply with 「お疲れ様です」(otsukaresama desu), which literally means "You must be tired," but it also has the meaning of "Great job!" or "You worked hard!" and other similar connotations.