Now here’s a swell surprise! “Accepted” is a teen comedy with nary a fart joke and a genuinely interesting subversive streak rather than the usual shock-for-shock’s-sake mentality that plagues this genre. It’s not a perfect movie, and its story is ludicrous, but darned if it isn’t charming in its bald-faced preposterousness.

Also charming and bald-faced is the main character, Bartleby Gaines (Justin Long), a Van Wilder-ish high school student in suburban Ohio who’s been gliding through his senior year selling fake IDs, weaseling out of jams, and having not a care in the world. Alas, this attitude has caused him to be rejected by every college he’s applied to, a fact which has frustrated him and disappointed his parents (Mark Derwin and Ann Cusack).

Bartleby arrives at the only logical solution, which is to create a letter of acceptance from a fictitious college, fake his parents out with it, move out of the house, and start cashing Dad’s tuition checks while the folks think he’s in school. The school he comes up with, South Harmon Institute of Technology (and no, its acronym never stops being funny), deceives Mom and Dad well enough — but then they mention how they’re looking forward to dropping him off at campus come fall, and Bartleby realizes he’ll have to make his deception even more elaborate.

You know how these things go. One minute you’re creating a false acceptance letter, the next minute you’re leasing a decrepit decommissioned mental hospital in a nearby town, renovating it so it looks like a college from the outside, and building a fully functional Web site to make the ruse complete. Bartleby and his cohorts — tightly wound over-achiever Rory (Maria Thayer), injured football player Hands (Columbus Short), and chubby sidekick Sherman (Jonah Hill) — are stunned to discover, however, that the Web site is TOO functional: Hundreds of desperate high school graduates clicked the right buttons on South Harmon’s site, mailed tuition checks to the P.O. box, and have shown up en masse for orientation.

Faced with the option of admitting it’s all a fraud or making South Harmon appear to be a real college, Bartleby and company opt for the latter, with Sherman’s Uncle Ben (Lewis Black), a burned-out former scholar, posing as the no-bullcrap dean. They go the liberal arts route, letting the students — who were all rejected by other schools and society in general — decide what they want to learn, then using all those tuition checks to facilitate it. Loopy stoner Glen (Adam Herschman) wants to be a chef? In comes the fancy kitchen equipment. Someone wants to be a fashion designer? Let her come up with the school’s colors and cheerleader uniforms.

As first-time director Steve Pink navigates surefootedly through all this madness, the appropriateness of the film’s title becomes apparent. What does it take to be “accepted” by society? A piece of paper saying you graduated from something? In this hippies-emerge-victorious fantasy, a “college” can be any place that facilitates learning and personal growth, regardless of what actually goes on there. When Bartleby visits the real Harmon College (which he’s claiming South Harmon is a “sister” to), he doesn’t see any learning taking place. He sees dazed students being bored by droning professors in vast lecture halls.

The film also takes on the feel-good vibe of a 1980s party-college movie, complete with a crusty old dean at the real Harmon (Anthony Heald) and a preppie frat president (Travis Van Winkle) causing trouble for the rascals over at South Harmon. I don’t think that angle is completely necessary, but it does enhance the movie’s lovably libertarian, us-against-them, fight-The-Man spirit.

Most importantly, the film is funny. Considering it was written by Mark Perez, Bill Collage and Adam Cooper — who between them have committed such atrocities as the Olsen twins’ “New York Minute” and Disney’s “Country Bears” — I wouldn’t have expected such wit and wisdom. And in truth, much of the film’s zip comes from the performances. Justin Long demonstrates remarkable comedic timing and finesse, confidently taking ownership of the movie despite it being his first major starring vehicle. Lewis Black is always a pleasure as the cranky, mildly insane fake dean, and he’s surrounded by bit players doing earnest, funny work as various off-kilter students.

I think I like Jonah Hill the best, though. A skilled improviser (look for the Oxygen network’s “Campus Ladies” to see him in another loony college setting), he whines through his role as Bartleby’s put-upon best friend with impressive grace, stealing scenes without meaning to. The film’s trailer shows one of his finer moments, screaming like a girl inside the creepy old sanitarium-turned-college, but I like his sardonic assessment when he first sees the building: “I’m glad we found this place! Now I can finally get hepatitis!”

The plot’s absurdity is freely admitted, I suspect even by the filmmakers. Yet the exuberance and free-spirited merriment of it all more than make up for it. It’s a friendly movie, the kind of movie you want to hang out with and be pals with. It makes you laugh, it’s kind of smart, and it’s in no position to judge you for the stupid things you do. What more could you want from a friend?

B (1 hr., 32 min.; PG-13, a lot of midlevel profanity, one F-word, a lot of vulgarity.)