Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. if (test && (num > Convert.ToInt32(maxstr)))
  2.                 {
  3.                     Console.WriteLine(-1);
  4.                     break;
  5.                 }
  6.  
  7.                 numMas = num.ToString().ToCharArray();
  8.  
  9.                 for (int i = 0; i < str.Length; i++)
  10.                 {
  11.                     if ((str[i] != '?') && (str[i] != numMas[i]))
  12.                     {
  13.                         check = false;
  14.                         break;
  15.                     }
  16.                 }
  17.  
  18.                 if ((str.Length == numMas.Length) && check)
  19.                 {
  20.                     Console.WriteLine(num);
  21.                     break;
  22.                 }
  23.  
  24.                 if (num > Convert.ToInt32(maxstr))
  25.                 {
  26.                     Console.WriteLine(-1);
  27.                     break;
  28.                 }
  29.  
  30.                 check = true;
  31.                 num += k;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement