I'm happy with Python 2.5

n00m n00m at narod.ru
Sun Feb 27 15:15:16 CET 2011


http://www.spoj.pl/problems/TMUL/

Python's "print a * b" gets Time Limit Exceeded.

=============================================
PHP's code
=============================================
fscanf(STDIN, "%d\n", &$tcs);
while ($tcs--) {
	fscanf(STDIN, "%s %s\n", &$n, &$m);
	echo bcmul($n, $m, 0)."\n";
}
=============================================
does it in 4.8s



More information about the Python-list mailing list