Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication2
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (int i1 = 111111; i1 <= 999999; i1++)
- {
- int a = i1 % 10;
- int b = (i1 / 10) % 10;
- int c = (i1 / 100) % 10;
- int d = (i1 / 1000) % 10;
- int e = (i1 / 10000) % 10;
- int f = (i1 / 100000) % 10;
- if (a * b * c * d * e * f == n)
- Console.Write("{0} ", i1);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement