从 wechall.net 到 net-force.nl 网站,发现网站的内容不错,里面也有不同类型的挑战题目:Javascript / Java Applets / Cryptography / Exploits / Cracking / Programming / Internet / Steganography,有的还有一定的难度。注册了帐号做题,我也从中学到了不少知识。对网络攻防有兴趣的同学可以尝试下。
level 601: Keep walking...
/*
This is a challenge to test your basic programming skills.
Pseudo code:
Set X = 1
Set Y = 1
Set previous answer = 1
answer = X * Y + previous answer + 3
After that => X + 1 and Y + 1 ('answer' becomes 'previous answer') and repeat this till you have X = 525.
The final answer is the value of 'answer' when X = 525. Fill it in below to check if it's the correct answer. If it is, you will get the password for the challenge page.
*/
第一题是热身题,直接按照题目所说的写代码就行了。
#include <stdio.h> int main() { int answer = 1; for(int x = 1, y = 1; x<=525; ++x, ++y) answer += (x*y + 3); printf("answer: %d\n", answer); return 0; }