Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class SevenlandNumbers
- {
- static void Main()
- {
- int k = int.Parse(Console.ReadLine());
- int next = k + 1;
- if (next % 10 == 7)
- {
- next += 3;
- if ((next / 10) % 10 == 7)
- {
- next += 30;
- if ((next / 100) % 10 == 7)
- {
- next += 300;
- }
- }
- }
- Console.WriteLine(next);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement