1 public class Divide_1 2 { 3 static int b = Integer.parseInt ("-1"); 4 int b1 = Integer.parseInt ("-1"); 5 static int zero = Integer.parseInt ("0"); 6 probe_1()7 void probe_1 () 8 { 9 try { 10 int a = Integer.parseInt ("-80000000", 16); 11 int c = a/b; 12 System.out.println (c); 13 } catch (Exception _) { 14 System.out.println (_); 15 } 16 17 try { 18 int a = Integer.parseInt ("-80000000", 16); 19 int c = a/-1; 20 System.out.println (c); 21 } catch (Exception _) { 22 System.out.println (_); 23 } 24 25 try { 26 int a = Integer.parseInt ("-80000000", 16); 27 int c = a%b; 28 System.out.println (c); 29 } catch (Exception _) { 30 System.out.println (_); 31 } 32 33 try { 34 int a = Integer.parseInt ("-80000000", 16); 35 int c = a%b1; 36 System.out.println (c); 37 } catch (Exception _) { 38 System.out.println (_); 39 } 40 41 try { 42 int a = Integer.parseInt ("-80000000", 16); 43 int c = a%-1; 44 System.out.println (c); 45 } catch (Exception _) { 46 System.out.println (_); 47 } 48 49 try { 50 int a = Integer.parseInt ("8000", 16); 51 int b = Integer.parseInt ("0", 16); 52 int c = a/b; 53 System.out.println (c); 54 } catch (Exception _) { 55 System.out.println (_); 56 } 57 58 try { 59 int a = Integer.parseInt ("8000", 16); 60 int b = Integer.parseInt ("0", 16); 61 int c = a%b; 62 System.out.println (c); 63 } catch (Exception _) { 64 System.out.println (_); 65 } 66 67 try { 68 long a = Long.parseLong ("-8000000000000000", 16); 69 long c = a/b; 70 System.out.println (c); 71 } catch (Exception _) { 72 System.out.println (_); 73 } 74 75 try { 76 long a = Long.parseLong ("-8000000000000000", 16); 77 long c = a%b; 78 System.out.println (c); 79 } catch (Exception _) { 80 System.out.println (_); 81 } 82 83 try { 84 long a = Long.parseLong ("8000", 16); 85 long b = Long.parseLong ("0", 16); 86 long c = a/b; 87 System.out.println (c); 88 } catch (Exception _) { 89 System.out.println (_); 90 } 91 92 try { 93 long a = Long.parseLong ("8000", 16); 94 long b = Long.parseLong ("0", 16); 95 long c = a%b; 96 System.out.println (c); 97 } catch (Exception _) { 98 System.out.println (_); 99 } 100 } 101 probe_2()102 void probe_2 () 103 { 104 try { 105 int a = -0x80000000; 106 int c = a/b; 107 System.out.println (c); 108 } catch (Exception _) { 109 System.out.println (_); 110 } 111 112 try { 113 int a = -0x80000000; 114 int c = a/-1; 115 System.out.println (c); 116 } catch (Exception _) { 117 System.out.println (_); 118 } 119 120 try { 121 int a = -0x80000000; 122 int c = a%b; 123 System.out.println (c); 124 } catch (Exception _) { 125 System.out.println (_); 126 } 127 128 try { 129 int a = -0x80000000; 130 int c = a%b1; 131 System.out.println (c); 132 } catch (Exception _) { 133 System.out.println (_); 134 } 135 136 try { 137 int a = -0x80000000; 138 int c = a%-1; 139 System.out.println (c); 140 } catch (Exception _) { 141 System.out.println (_); 142 } 143 144 try { 145 int a = 0x8000; 146 int b = 0; 147 int c = a/b; 148 System.out.println (c); 149 } catch (Exception _) { 150 System.out.println (_); 151 } 152 153 try { 154 int a = 0x8000; 155 int b = 0; 156 int c = a%b; 157 System.out.println (c); 158 } catch (Exception _) { 159 System.out.println (_); 160 } 161 162 try { 163 long a = -0x7fffffffffffffffL - 1; 164 long c = a/b; 165 System.out.println (c); 166 } catch (Exception _) { 167 System.out.println (_); 168 } 169 170 try { 171 long a = -0x7fffffffffffffffL - 1; 172 long c = a%b; 173 System.out.println (c); 174 } catch (Exception _) { 175 System.out.println (_); 176 } 177 178 try { 179 long a = 0x8000; 180 long b = 0; 181 long c = a/b; 182 System.out.println (c); 183 } catch (Exception _) { 184 System.out.println (_); 185 } 186 187 try { 188 long a = 0x8000; 189 long b = 0; 190 long c = a%b; 191 System.out.println (c); 192 } catch (Exception _) { 193 System.out.println (_); 194 } 195 } 196 main(String[] args)197 public static void main (String[] args) 198 { 199 Divide_1 d = new Divide_1 (); 200 d.probe_1 (); 201 d.probe_2 (); 202 } 203 } 204