BFMODULO - "a mod b" in BF

no tags 

your task is simple ..find the answer of a mod b as fast as you can.
a and b are integers
0<=a<1000 and 0<b<10

Input:


integer a with leading zeroes
then space ASCII(32)
then b .. and EndOfLine ASCII(10)
 

output:


the value of(a mod b)

 

Example1:
input:

999 2

output:

1 

 

Example2:
input:
005 6

output:

5


Example3:
input:
099 1

output:
0



Score:

 


Sometimes I enjoy writing lots of '+' in my code ..
but sometimes I prefer some thing like ++++[->++++<] to shorten it.
But With This New Judge, the first way is shorter.
This New BF_OPERTIONS_COUNTER counts how many BFoperations your implemintaion do ..

example..


code1  :  +++++++++++++++.
code2  :  +++[->+++++<]>.


as you see LengthOfcode2< LengthOfcode1
But .. the judge look at code2 like this:
+++[->+++++<]->+++++<]->+++++<]>.
and It will count these operators : '+','-','<','>' only


so : code1 will have score of 15
and code2 will have score of 28

Score is "how many '+','-','>','<' your code does at the run time"

BUT: since there is many test files ... and your code may expand or shorten as the judge see it ..
So the final Score will be your scores average ...

Thanks for Tjandra Satria Gunawan for his suggestion for the new judge .

 

note: you can see how the judge read your code at your submission info (only the first test file).

LAST UPDATE NOTE 15/1/2012:

I've complete improving test files ... there is now 59 test files ,also now you can write  100,000 byte code

after solving the problem,maybe you can see that MCLT: MORE CODE --> LESS TIME Wink

Enjoy :)


hide comments
(Tjandra Satria Gunawan)(曾毅昆): 2013-01-15 15:47:34

haha, seems that 5 loops [] is too expensive :-P

Mitch Schwartz: 2013-01-15 15:47:34

Custom judge means we do not know the specifics of how you implemented BF. For example, what are min/max values of cells, can we travel to the left of the starting point, and what is placed in the cell when "," command is executed and EOF is reached? Did you not consider this?

Last edit: 2013-01-09 19:26:41
Aditya Pande: 2013-01-15 15:47:34

how can i see my "expanded" code?
i guess it is only visible to you

Last edit: 2013-01-09 18:39:15

Added by:Mostafa 36a2
Date:2013-01-07
Time limit:1s
Source limit:100000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:BF
Resource:FizzBuzz Happy 2013