Programming - 2. Are you fast enough?

2008. 6. 13. 02:19
Question:

This challenge is a simple calculation.
When you click on the link below you will get a number.
The calculation is: answer = (number * 3 + 2) - 250

Example with number 1500:
4252 = (1500 * 3 + 2) - 250

In this example 4252 is the answer...answer like this: prog2.php?solution=4252
You must do this within 2 seconds. If the answer is correct, you will get the password.


answer: 
             처음엔 걍 c로 만들어서 2초안에 넣어볼라고 쇼를 했다.
             내타수가 그렇게 느린줄 몰랐다. 세상에 만만한거 하나 없더라.
             뭘로 해볼까 하다가 만만한 자바 스크립트로 했는데 막상 해볼려니
             이것 또한 시간을 꽤나 잡아먹었다.

<html>
<head>
<script>
function calc(){
str1 = myform.solution.value;
answer = (str1 * 3 + 2) - 250;
myform.solution.value = answer;
return;
}
</script>
</head>
<body>
<form name="myform" method="get" action="http://net-force.nl/challenge/level602/prog2.php" onsubmit="calc()">
Number: <input type=text name=solution><br>
<input type=submit value=전송>
</form>
</body>
</html>

       
The password is: damnfast

'War game > net-force.nl' 카테고리의 다른 글

Programming - 1. keep walking...  (0) 2008.06.12

badcob War game/net-force.nl