Top 20

1 0x00h 695 pts
2 boris39 695 pts
3 neoxquick 676 pts
4 maf-ia 658 pts
5 eax 657 pts
6 thefinder 639 pts
7 benito255 604 pts
8 nikokks 597 pts
9 mego 588 pts
10 madbat2 579 pts
11 plucth 561 pts
12 Mart 549 pts
13 Stupefy 529 pts
14 tehron 502 pts
15 Kithyane 497 pts
16 egosum 470 pts
17 rostale 462 pts
18 malose 427 pts
19 CoYoTe99 414 pts
20 Undr 412 pts

Classement complet

Shoutbox

21 Oct - 9:48 pm

Équation du challenge 52 corrigée, merci

16 Oct - 8:43 am

Bonjour, il y a aussi un problème d'affichage "invalid equation" dans le challenge 52. Merci

14 Oct - 8:57 pm

Barbapapou l'équation du challenge 29 a été corrigée

4 Oct - 10:30 am

Bonjour, il y a un problème avec l'affichage d'une équation dans le challenge 29

24 Aug - 7:10 pm

@rostale, en effet l'épreuve 21 ne fonctionne plus depuis un moment, pour l'instant on a pas prévu de temps pour la réparer je pense qu'on va finir par la supprimer tout simplement. @nikokks, ok je t'envoie un mail

22 Aug - 11:40 pm

Salut Metatr0n. pourrait on avoir une discussion en MP. J'imagine que tu as mon mail. Ce serait pour discuter de microcontest en general.

28 Jul - 10:38 pm

Pouvez-vous vérifier l'épreuve Email (21) ? En effet, je ne reçois pas d'email de la part du site. Merci

28 Jul - 7:29 pm

Bonjour et merci. Cependant, j'ai résolu le challenge qui me posait pb, donc plus rien à demander... pour l'instant.

28 Jul - 1:48 pm

Ça devrait être réparé maintenant

28 Jul - 12:04 pm

Bonjour, effectivement j'ai le même message d'erreur, on va investiguer merci d'avoir rapporté le soucis

Connexion
Mot de passe oublié

Supportez nousx

Vous aimez µContest ?
Supportez nous en votant (fun et difficulté) pour µContest sur WeChall :)
Si vous ne l'avez pas encore fait, profitez-en pour lier votre compte
Wechall à µContest pour pouvoir voter !

Merci

Contents

µContest, what is it ? How to participate ? How to solve the challenges proposed ? What language ? You will find all the answers to theses questions in this page. Concerning more specific questions, you can ask them on the forum.

General

How to solve a challenge

The µContest libraries

Example of a challenge resolution I

Example of a challenge resolution II

Technical documentations

Library Python documentation

General information

Current version : 2.2

The library contains functions that enable you

  • to check if the lib is up to date
  • to get the variable values of a challenge
  • to send back the answer(s) you found to the website
  • print formatted results
You just have to import the lib by doing :
from libmicrocontest2_python27 import *

Available functions

Here is a list of the functions you can use :

Function Prototype Description
- check_version - check_version() Checks if the lib is up to date
- get_currentversion - get_currentversion() Return the version of the lib you are currently using
- commence_contest - commence_contest(id_contest)
- commence_contest(id_contest, username, password)
Gets the variables from the website
- Contest.get_str
- Contest.get_int
- Contest.get_float
- Contest.get_param
- Contest.get_str(variable_name)
- Contest.get_int(variable_name)
- Contest.get_float(variable_name)
- Contest.get_param(variable_name, type)
Give you the variables downloaded by MC_StartContest
- Contest.append_answer - Contest.append_answer(variable_name, answer) Add answers to the final solution
- Contest.submit_answer - Contest.submit_answer() Sends the final solution to the website

check_version

Prototype / Description

check_version()

Enables you to check if the lib version if up to date.

Parameters

N/A

Return value

true if the lib is up to date, false otherwise.

Example

if not check_version():
	print "Warning: the version of the libmicrocontest2 is not the last one."
	print "Current version :\t" + get_currentversion()
	print "This program may not work properly. Consider downloading the latest version on\nthis page : http://www.microcontest.com/download.php\n"

get_currentversion

Prototype / Description

get_currentversion()

Returns the version of the lib you are using.

Parameters

N/A

Return value

The version of the lib you are using, as a string. (e.g. "2.2").

Example

if not check_version():
	print "Warning: the version of the libmicrocontest2 is not the last one."
	print "Current version :\t" + get_currentversion()
	print "This program may not work properly. Consider downloading the latest version on\nthis page : http://www.microcontest.com/download.php\n"

commence_contest

Prototype / Description

  • commence_contest(id_contest)
  • commence_contest(id_contest, username, password)
Downloads new variable values from the website and store it. You need to use get_xxx to get them. The first form will use the information you put in credentials.py in the same directory :
username = "harry"
password = "potter"

Parameters

  • [in] id_contest : The ID of the contest you want to solve, written on every contest page.
  • [in] username : (Optional if you use a file credentials.py) Your username.
  • [in] password : (Optional if you use a file credentials.py) Your password.

Return value

A Contest object you have to use to retreive the variable values.

Example

cont = commence_contest(4, "Your nickname", "Your password")
# short form uses username, password from credentials.py
# cont = commence_contest(4)

CryptedText = cont.get_str('txt_crypte')
Key = cont.get_int('key')

Contest.get_str

Prototype / Description

Contest.get_str(variable_name)

Once you called commence_contest, you can retrieve the string variables values with this function.

Parameters

[in] variable_name : The identificator string of the variable you want to retrieve written on every contest page.

Return value

The string value of the variable.

Example

cont = commence_contest(4, "Your nickname", "Your password")

CryptedText = cont.get_str('txt_crypte')

Contest.get_int

Prototype / Description

Contest.get_int(variable_name)

Once you called commence_contest, you can retrieve the int variables values with this function.

Parameters

[in] variable_name : The identificator string of the variable you want to retrieve written on every contest page.

Return value

The value of the variable.

Example

cont = commence_contest(4, "Your nickname", "Your password")

Key = cont.get_int('key')

Contest.get_float

Prototype / Description

Contest.get_float(variable_name)

Once you called commence_contest, you can retrieve the float variables values with this function.

Parameters

[in] variable_name : The identificator string of the variable you want to retrieve written on every contest page.

Return value

The value of the variable.

Example

cont = commence_contest(2, "Your nickname", "Your password")

a = cont.get_float('a')
b = cont.get_float('b')
c = cont.get_float('c')

Contest.get_param

Prototype / Description

Contest.get_param(variable_name, type)

Once you called commence_contest, you can retrieve the variables values with this function.

Parameters

  • [in] variable_name : The identificator string of the variable you want to retrieve written on every contest page.
  • [in] type : The type of the variable, can be str, int or float

Return value

The value of the variable as a string.

Example

cont = commence_contest(4, "Your nickname", "Your password")

CryptedText = cont.get_param('txt_crypte', str)
Key = int(cont.get_param('key', int))

Contest.append_answer

Prototype / Description

Contest.append_answer(variable_name, answer)

Once you solved the challenge, you need to add the answer(s) to the final solution. Then, you will call Contest.submit_answer that will send all your answers to the website. You should use this function to add variables to the solution.

Parameters

  • [in] variable_name : The identificator string of the variable you want to send written on every contest page.
  • [in] answer : The variable value (can be str, int or float variables)

Return value

N/A

Example

cont = commence_contest(1, "Your nickname", "Your password")

a = cont.get_int("a")
b = cont.get_int("b")

s = a + b

cont.append_answer("s", s)
print(cont.submit_answer())

Contest.submit_answer

Prototype / Description

Contest.submit_answer()

Once you solved the challenge and added all the answer variables to the solution, you need to call this function in order to send the solution to the website.

Parameters

N/A

Return value

A string informing you about the result.

Example

cont = commence_contest(1, "Your nickname", "Your password")

a = cont.get_int("a")
b = cont.get_int("b")

s = a + b

cont.append_answer("s", s)
print(cont.submit_answer())