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 1404. Easy to Hack!

What's wrong?
Posted by Make_ 4 Nov 2011 04:32
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  int c,m=5,b='a';
  int a,k=0;
  while((c=getchar())!=-1)
  {
    a=(26+(c-b)-m)%26;
    printf("%c",a+b);
    m=c-b;
  }
  return 0;
}

i've got an WA#1...

Edited by author 04.11.2011 21:08