###思路求解代码publicstaticvoidmain(String[]args)throwsIOException{BufferedReaderbrnewBufferedReader(newInputStreamReader(System.in));PrintWriteroutnewPrintWriter(newOutputStreamWriter(System.out));String[]strbr.readLine().trim().split(\\s);LongaLong.parseLong(str[0]);LongbLong.parseLong(str[1]);longggcd(a,b);longl(a0||b0)?0:(a/g)*b;out.println(g l);out.flush();out.close();br.close();}privatestaticlonggcd(longa,longb){while(b!0){longtmpb;ba%b;atmp;}returna;}