Skip to content

Latest commit

 

History

History

Java BigInteger

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Java HackerRank

Difficulty Max Score Success Ratio
Easy 10 97.61%

In this problem, you have to add and multiply huge numbers! These numbers are so big that you can't contain them in any ordinary data types like a long integer.

Use the power of Java's BigInteger class and solve this problem.

Input Format

There will be two lines containing two numbers, [SVG image] and [SVG image] .

Constraints

[SVG image] and [SVG image] are non-negative integers and can have maximum [SVG image] digits.

Output Format

Output two lines. The first line should contain [SVG image] , and the second line should contain [SVG image] . Don't print any leading zeros.

Sample Input

1234
20

Sample Output

1254
24680

Explanation

[SVG image]

[SVG image]

💡 Hints

➡️ Approach

✅ Detailed Solution

View Solution : Java BigInteger

Submissions Leaderboard Discussions Editorial
📝 My Submission 🏆 Track our position 🤔 Help from Community ✍️ Editorial