import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
public class Main {
static class Reader {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader()
{
din = new DataInputStream(System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public Reader(String file_name) throws IOException
{
din = new DataInputStream(
new FileInputStream(file_name));
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public String readLine() throws IOException
{
byte[] buf = new byte[64]; // line length
int cnt = 0, c;
while ((c = read()) != -1) {
if (c == '\n') {
if (cnt != 0) {
break;
}
else {
continue;
}
}
buf[cnt++] = (byte)c;
}
return new String(buf, 0, cnt);
}
public int nextInt() throws IOException
{
int ret = 0;
byte c = read();
while (c <= ' ') {
c = read();
}
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
private void fillBuffer() throws IOException
{
bytesRead = din.read(buffer, bufferPointer = 0,
BUFFER_SIZE);
if (bytesRead == -1)
buffer[0] = -1;
}
private byte read() throws IOException
{
if (bufferPointer == bytesRead)
fillBuffer();
return buffer[bufferPointer++];
}
public void close() throws IOException
{
if (din == null)
return;
din.close();
}
}
public static void main(String[] args)
throws IOException
{
Reader s = new Reader();
BigInteger A = new BigInteger(s.readLine());
BigInteger B = new BigInteger(s.readLine());
System.out.println(A.divide(B));
System.out.println(A.mod(B));
}
}
連 java 也貼出來了
算了,我都不是原題主
真沒公平性。
我真好奇,你們貼這些都是為了什麼
我真好奇,你們貼這些都是為了什麼
十分佩服貼程式碼者的編程能力
不過如果只貼心得不貼程式碼就更好了呵
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
public class Main {
static class Reader {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader()
{
din = new DataInputStream(System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public Reader(String file_name) throws IOException
{
din = new DataInputStream(
new FileInputStream(file_name));
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public String readLine() throws IOException
{
byte[] buf = new byte[64]; // line length
int cnt = 0, c;
while ((c = read()) != -1) {
if (c == '\n') {
if (cnt != 0) {
break;
}
else {
continue;
}
}
buf[cnt++] = (byte)c;
}
return new String(buf, 0, cnt);
}
public int nextInt() throws IOException
{
int ret = 0;
byte c = read();
while (c <= ' ') {
c = read();
}
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
private void fillBuffer() throws IOException
{
bytesRead = din.read(buffer, bufferPointer = 0,
BUFFER_SIZE);
if (bytesRead == -1)
buffer[0] = -1;
}
private byte read() throws IOException
{
if (bufferPointer == bytesRead)
fillBuffer();
return buffer[bufferPointer++];
}
public void close() throws IOException
{
if (din == null)
return;
din.close();
}
}
public static void main(String[] args)
throws IOException
{
Reader s = new Reader();
BigInteger A = new BigInteger(s.readLine());
BigInteger B = new BigInteger(s.readLine());
System.out.println(A.divide(B));
System.out.println(A.mod(B));
}
}
請問程式碼貼出來的用意為何? 討論 是請你分享自己在寫這題的心得 而不是貼程式碼
有時候 不管事留言口氣 內容 各種不妥 不要以為別不知道你心裡在說什麼
當別人明說時又說 你沒有 大家都不是傻子好嗎!
我真好奇,你們貼這些都是為了什麼
十分佩服貼程式碼者的編程能力不過如果只貼心得不貼程式碼就更好了呵
不貼程式碼的話怎麼讓別人抄到 1700 多題呢
我真好奇,你們貼這些都是為了什麼
十分佩服貼程式碼者的編程能力不過如果只貼心得不貼程式碼就更好了呵
不貼程式碼的話怎麼讓別人抄到 1700 多題呢
確實,因為本身是出題者看得到程式碼
樓上幾位回覆的 puiching 學生每題都是用抄的,還連同註解一起抄
他們自己就是抄題者,卻說出某些言論,看到也是覺得蠻有趣的
抱歉各位,我保證以後永遠不再抄題了,感謝各位指出我的錯誤。
我真好奇,你們貼這些都是為了什麼
我也很好奇,你們抄了1000多題都是為了什麼