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