Cod sursa(job #638206)
Utilizator | Data | 20 noiembrie 2011 19:34:06 | |
---|---|---|---|
Problema | PalM | Scor | 0 |
Compilator | cpp | Status | done |
Runda | .com 2011 | Marime | 0.37 kb |
#include <cstdio>
#include <ctime>
#include <cstdlib>
#include <cstring>
using namespace std;
char s[550];
int main()
{
int N;
freopen("palm.in","r",stdin);
freopen("palm.out","w",stdout);
fgets(s,550,stdin);
N=strlen(s);
srand(time(NULL));
int x=rand()%N;
if(x%2==0) x+=1;
printf("%d\n",x);
return 0;
}