4 public class tester {
\r
7 public static int Main () {
\r
12 bool exception = false;
\r
20 catch (OverflowException) {
\r
39 } catch (Exception) {
\r
56 catch (OverflowException) {
\r
71 Console.WriteLine("No Exception");
\r
73 catch (OverflowException) {
\r
102 int[][] cases = new int [][] {
\r
103 new int [] {0, 0, 0},
\r
104 new int [] {-5, 0, 0},
\r
105 new int [] {3, -5, -15},
\r
106 new int [] {3, 5, 15},
\r
107 new int [] {-3, -5, 15},
\r
108 new int [] {-3, 5, -15},
\r
109 new int [] {-1, 32767, -32767},
\r
110 new int [] {32767, -1, -32767}};
\r
113 for (int j = 0; j < cases.Length; ++j)
\r
114 if (cases [j][0] * cases [j][1] != cases [j][2])
\r
158 if (j * k != -32767)
\r
163 if (j * k != -32767)
\r
171 long[][] cases = new long [][] {
\r
172 new long [] {0, 0, 0},
\r
173 new long [] {-5, 0, 0},
\r
174 new long [] {3, -5, -15},
\r
175 new long [] {3, 5, 15},
\r
176 new long [] {-3, -5, 15},
\r
177 new long [] {-3, 5, -15},
\r
178 new long [] {-1, 2147483647, -2147483647},
\r
179 new long [] {2147483647, -1, -2147483647}};
\r
181 for (int j = 0; j < cases.Length; ++j)
\r
182 if (cases [j][0] * cases [j][1] != cases [j][2])
\r
186 Console.WriteLine("test-ok");
\r