Search found 3 matches

by gix
Sun Jun 30, 2002 8:59 pm
Forum: Volume 100 (10000-10099)
Topic: 10019 - Funny Encryption Method
Replies: 45
Views: 10873

decimal or hexadecimal?

but the problem says:
"Each of the following N Lines ( 0<N<=1000) will contain the number M (0<M<=9999, in decimal representation)"

....
?????
mah
maybe I should try another hobby :(
by gix
Sun Jun 30, 2002 4:14 pm
Forum: Volume 100 (10000-10099)
Topic: 10019 - Funny Encryption Method
Replies: 45
Views: 10873

ok, solved!

thanks a lot, I suppose the problem was on blank or EOF checks ... Maybe I've to study iostream better :)
but why 14 bits wasn't too much?
if 0<M<9999 and 2^14 = 16384 I think 14 bits are enogh (ok 13 were few :) ... But when I try to submit my source with the following lines:

for (i=0; i<15; i ...
by gix
Sun Jun 30, 2002 1:44 am
Forum: Volume 100 (10000-10099)
Topic: 10019 - Funny Encryption Method
Replies: 45
Views: 10873

10019 - Funny Encryption Method

I get a sigsev on this source:

#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

int mypow (int b, int exp)
{
int res = b;

if (exp==0)
return 1;

while (exp>1)
{
res = res * b;
exp --;
}



return res;
}

int main (void)
{
#ifndef ONLINE ...

Go to advanced search