ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1567. SMS-spam

this is very good and short code
Posted by Sunnat 16 Jan 2012 02:34
#include<cstdio>
int main()
{
    int s=0,a;
    for(;(a=getchar())!='\n';(a==' ')?s++:(a%3==0)?s+=3:s+=a%3);
    printf("%i",s);
    return 0;
}
Re: this is very good and short code
Posted by Sawyer5 17 Jun 2014 12:09
Why it's work?