Out of all literary genres, comedy is arguably the most accessible. After all, it would be difficult to find someone who doesn't like to have a good laugh. But only because it is simple doesn't mean that it is easy to execute, especially when it comes to movies. A good comedy film gives its audiences a fun memory to look back on, while the mediocre ones are fated to be forgotten a few hours after the credits roll. And while comedy is generally seen as a family-friendly genre of movies, that isn't always the case.

RELATED: 10 Best So-Bad-They're-Good Comedy Movies On Netflix

A hard R-rating for a comedy film signifies the usage of violent, sexual, or profane themes to an extreme extent, and whether this plays out in an advantageous manner or not varies from film to film. The following list catalogs some highly acclaimed comedy films that use the flexibility provided by their ratings to produce some impressively hilarious results.

The Hangover (2009) - 78%

Phil (Bradley Cooper), Stu (Ed Helms), and Alan (Zach Galifianakis) in The Hangover

While a rating of 78% is nothing to boast about (and the ratings of the sequels even more abysmal at 33% and 20%), what is impressive is that The Hangover is the highest-grossing R-rated comedy series ever with a total box-office gross of $1.4 billion.

From Joker director Todd Phillips, the first film in The Hangover trilogy follows four friends after a night of partying at a bachelor party, having to deal with the consequences of their drunken escapades.

Good Boys (2019) - 80%

Poster for Good Boys featuring stars Jacob Tremblay, Keith L. Williams and Brady Noon

A movie mainly about three sixth-graders has no business having as many F-bombs and sex toys-related jokes as Good Boys does, but that's part of the charm, in a manner of speaking.

The film even points that out itself in its poster, where the lead characters are shown to be shorter than how tall a person needs to be in order to be eligible to see this movie. A coming of age drama about a group of "tweens" (as they like to call themselves in the film), they get into blunder after blunder while trying to attend a party.

Zombieland (2009) - 89%

Woody Harrelson, Jesse Eisenberg, Emma Stone, and Abigail Breslin in Zombieland holding weapons

A road trip film set against the backdrop of a post-apocalyptic America destroyed at the hands of hordes of undead, Zombieland's main message is that only because the world has come to an end doesn't mean it has to stop being fun.

RELATED: 10 Things You Never Knew About The Making Of Zombieland

All the blood and carnage may not be everyone's cup of tea, but the film applies it well to boost the humor to fantastic levels, supported by the cast of characters. Four people from different corners of life come together and grow close as a family as they travel to a common destination in this horror-comedy flick.

Bridesmaids (2011) - 90%

Kristen Wiig, Maya Rudolph, Rose Byrne, Melissa McCarthy, and Ellie Kemper in Bridesmaids

For better or worse, a sizeable percentage of comedy films, R-rated or otherwise, features a male cast of characters getting up to no good. Bridesmaids, with a female-only cast, is a sharp contrast to that industry trend, and a pretty good one at that, proved by the fact that it received two Oscar nominations.

With an ensemble cast of Kristen Wiig (who also co-wrote the film), Maya Rudolph, Rose Byrne, Melissa McCarthy, Wendi McLendon-Covey, and Ellie Kemper, the plot is about a group of women and their lives as the wedding of one of their friends approaches.

The Nice Guys (2016) - 91%

Ryan Gosling and Hugh Jackman in The Nice Guys

Buddy cop movies were a staple of the film industry in the 80s and 90s, and The Nice Guys is a throwback to that bygone era, although none of the main characters are actually cops

Russell Crowe and Ryan Gosling play the part of two private investigators who team up to look for a teenage girl in 1970s Los Angeles. Besides being a box-office bomb, the mass media was too infatuated with Gosling's other film of that year, the musical La La Land, to give The Nice Guys the attention it deserved.

Shaun of the Dead (2004) - 92%

Simon Pegg and Nick Frost prepare to fight zombies in Shaun of the Dead

Edgar Wright's Three Flavours Cornetto trilogy, all starring Simon Pegg and Nick Frost, is a comedic masterpiece and a cult classic by every definition. All three films are a blend of various genres, with humor being the common element that binds them all, and Shaun of the Dead is the highest rated in the trilogy.

RELATED: The 5 Scariest Scenes In Shaun Of The Dead (& The 5 Funniest)

A take on the ever-popular zombie apocalypse genre, it tells the story of a man Shaun as he tries to survive a zombie apocalypse with his friends. Filled with profanity that suits its British origins, the film doesn't shy away from showcasing the blood and gore fest that comes with playing around with the concept of zombies.

Midnight Run - 94%

Robert De Niro and Charles Grodin on a bus in Midnight Run

Robert De Niro is not the first name that comes to mind when people think of a comedy star, but perhaps that's why Midnight Run works out so well, due to the unlikely chemistry between its lead actors Robert De Niro and Charles Grodin.

From Beverly Hills Cop director Martin Brest, the film revolves around a bounty hunter (played by De Niro) as he tries to track down a criminal accountant on the run from the FBI and the Mafia after stealing $15 million from a mob boss.

Monty Python's Life of Brian (1979) - 95%

man being held in shackles in the stoning scene in Monty Python's Life of Brian

Religious satire can be a difficult niche to work with, as it comes with the risk of offending a large group of people and being labeled distasteful. But if there's anyone capable of dealing with such a matter it's the legendary British comedy group Monty Python, who are experts at squeezing out the ridiculousness and hilarity from the most absurd of premises.

RELATED: Monty Python: 5 Reasons Why Holy Grail Is Their Best Film (& 5 Why Life Of Brian is A Close Second)

Life of Brian centers around the titular character of Brian, the neighbor of Jesus born on the same day as him who is mistaken for being the Messiah by the people.

Spy (2015) - 95%

Melissa McCarthy in Spy pointing a gun while sitting on a pizza delivery bike

A twist on the age-old spy thriller formula, Spy follows the adventures of Melissa McCarthy as Susan Cooper, a CIA agent who is used to working behind the scenes as support. When a terrorist gets their hands on the top field agents of the agency, she volunteers in their place to hunt the villains down.

McCarthy's character is unqualified for such a role, and the film uses this as a clever way to poke fun at other generic spy-thrillers and action cliches while being funny in its own right.

What We Do in the Shadows (2014) - 96%

Taika Waititi with vampire teeth holding up a glass in What We Do in the Shadows

Taika Watiti's fame has grown a great deal in recent years, thanks to his work on blockbuster and Oscar-nominated films like Thor: Ragnarok and Jojo Rabbit.

One of his earliest hits, What We Do in the Shadows is a mockumentary about a group of vampires who share a house and live together in modern times. It turns out what centuries-old vampires do in the shadows is bicker with each other about doing chores like washing the dishes and occasionally lure people into their houses to feast on them.

NEXT: Ocean's Eleven & 9 Other Great Crime Comedies