using System;
public class Test
{
public static void Main()
{
int[] x = { 2, 5, 32, 46, 92, 105, 210, 315 };
int[] y = { 1, 3, 9, 16, 32, 41, 57, 95 };
int[] z = { 4, 7, 9, 11, 13, 27, 32, 95 };
int p = 0, q = 0, r = 0;
while (!((x[p] == y[q]) & (y[q] == z[r])))
{
if (x[p] < y[q]) p = p + 1;
else
if (y[q] < z[r]) q = q + 1;
else
if (z[r] < x[p]) r = r + 1;
};
Console.WriteLine(x[p]);
Console.ReadKey();
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCSBpbnRbXSB4ID0geyAyLCA1LCAzMiwgNDYsIDkyLCAxMDUsIDIxMCwgMzE1IH07CiAgICAgICAgICAgIGludFtdIHkgPSB7IDEsIDMsIDksIDE2LCAzMiwgNDEsIDU3LCA5NSB9OwogICAgICAgICAgICBpbnRbXSB6ID0geyA0LCA3LCA5LCAxMSwgMTMsIDI3LCAzMiwgOTUgfTsKCiAgICAgICAgICAgIGludCBwID0gMCwgcSA9IDAsIHIgPSAwOwogICAgICAgICAgICAgICAgd2hpbGUgKCEoKHhbcF0gPT0geVtxXSkgJiAoeVtxXSA9PSB6W3JdKSkpCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHhbcF0gPCB5W3FdKSBwID0gcCArIDE7CiAgICAgICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgaWYgKHlbcV0gPCB6W3JdKSBxID0gcSArIDE7CiAgICAgICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgICAgIGlmICh6W3JdIDwgeFtwXSkgciA9IHIgKyAxOwogICAgICAgICAgICAgICAgfTsKCiAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKHhbcF0pOwogICAgICAgICAgICBDb25zb2xlLlJlYWRLZXkoKTsKCQkKCX0KfQ==