mamhh's blog

By mamhh, 14 years ago, In English
Hi all, the function "pow( x , y )" should raise x to the y-th power , it works fine on my PC, but it gives me wrong answer on codeforces .

the problem is : I have a string , say "123", when I make call the function like this " pow( 10 , str.size()-1 ) " it returns "99"
why not returning "100"  ???

my code: http://pastebin.com/B1LXwys6
the problem  :  http://www.codeforces.com/problemset/problem/61/C

thnx in advance :) .

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By mamhh, 14 years ago, In English
Hi everybody,
Unfortunately a lot of  programmers failed in ( 65A:  Harry Potter and Three Spells ) :( :( .
Really it was very tricky problem. the problem statement is easy. but the point here is to cover all possible cases.
anyhow, I failed pass it during the contest. many thanks to those who hacked me ;)
I love this type of problems so much , and I think each round should contain at least one problem of that type.
waiting ur comments :)......

By the way: I brought another tricky&crazy problem from SPOJ .here it is :

Problem Statement :    ( No Problem Statement )

Input: 
10
123
8209

Output:
1
0
4
.....................................................................................................
waiting ur Solutions. ;)
best wishes for allllllll :)

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it

By mamhh, 14 years ago, In English
hi all, I need test case no.7  ,cause if fail in that case, problem -E-  (Ivan the Fool VS Gorynych the Dragon )

School Personal Contest #3 (Winter Computer School 2010/11)
-
Codeforces Beta Round #45 (ACM-ICPC Rules)

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it