Cyclic

ABC 379

Problem 37 of 50

Easy

What to do

You are given a three-digit number made of digits from 1 to 9. You need to rearrange the digits in two different ways and print the new numbers you create from those arrangements.

Key Concepts

String manipulation Indexing Basic input/output Integer conversion

Examples

Input: 379

Output: 793 937

Input: 919

Output: 199 991

Tips for Beginners

  • Focus on understanding the logic, not memorizing syntax
  • Use print statements to debug your code
  • Don't worry about input parsing - the function handles that for you
  • If stuck, try writing out your solution on paper first

Python Editor

Loading Python...