Solution to String To Int from Jobdu

13 Sep

Question (in Chinese): http://ac.jobdu.com/problem.php?pid=1508 Question Name: String To Int Question Description: Convert the input string into an integer. The input string may or may not represent a valid and non-overflow integer. Input: the input might contain multiple test cases. Each … Read More »

Solution to Add Two Numbers from Jobdu

13 Sep

Question (in Chinese): http://ac.jobdu.com/problem.php?pid=1507 Question Name: Add Two Numbers Question Description: Compute the sum of two integers without addition, subtraction, multiplication and division. Input: the input might contain multiple test cases. Each line, as a test case, contains two integers … Read More »

Solution to Accumulate from Jobdu

12 Sep

Question (in Chinese): http://ac.jobdu.com/problem.php?pid=1506 Question Name: Accumulate Question Description: Compute the sum of integers from 1 to n without condition statement like “if”, “while”, “for”, “else”, “switch”, “case” and “? :”. And no multiplication or division is allowed. Input: the … Read More »