#36365: java


501268 (papa)

學校 : 不指定學校
編號 : 85465
來源 : [114.42.147.61]
最後登入時間 :
2024-04-29 15:33:55
l033. 大數除法 -- 不是我的題 | From: [125.224.197.197] | 發表日期 : 2023-07-15 15:31

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));
       
    }
}
 
#36366: Re: java

Unknown User

l033. 大數除法 -- 不是我的題 | From: [60.246.55.199] | 發表日期 : 2023-07-15 15:41

連 java 也貼出來了

算了,我都不是原題主

真沒公平性。

 
#36367: Re: java

Unknown User

l033. 大數除法 -- 不是我的題 | From: [60.246.55.199] | 發表日期 : 2023-07-15 15:42

我真好奇,你們貼這些都是為了什麼

 
#36368: Re: java


1360467-8@g.puiching.edu.mo (三國迷李牧粉)

學校 : 不指定學校
編號 : 189084
來源 : [202.86.172.163]
最後登入時間 :
2023-10-20 12:55:38
l033. 大數除法 -- 不是我的題 | From: [60.246.48.201] | 發表日期 : 2023-07-15 15:46

我真好奇,你們貼這些都是為了什麼


十分佩服貼程式碼者的編程能力

不過如果只貼心得不貼程式碼就更好了呵

 
#36369: Re: java

Unknown User

l033. 大數除法 -- 不是我的題 | From: [123.192.81.156] | 發表日期 : 2023-07-15 15:50

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));
       
    }
}

請問程式碼貼出來的用意為何? 討論 是請你分享自己在寫這題的心得 而不是貼程式碼 
有時候 不管事留言口氣 內容 各種不妥 不要以為別不知道你心裡在說什麼 
當別人明說時又說 你沒有 大家都不是傻子好嗎!

 
#36370: Re: java


fire5386 (becaidorz)

學校 : 國立清華大學
編號 : 115822
來源 : [101.12.147.118]
最後登入時間 :
2024-05-19 09:33:31
l033. 大數除法 -- 不是我的題 | From: [43.255.89.220] | 發表日期 : 2023-07-15 15:59

我真好奇,你們貼這些都是為了什麼


十分佩服貼程式碼者的編程能力

不過如果只貼心得不貼程式碼就更好了呵

不貼程式碼的話怎麼讓別人抄到 1700 多題呢

 
#36374: Re: java


mushroom.cs98@g2.nctu.edu.tw (mushroom)

學校 : 國立臺灣大學
編號 : 67469
來源 : [36.227.132.216]
最後登入時間 :
2024-05-16 18:44:48
l033. 大數除法 -- 不是我的題 | From: [111.243.12.172] | 發表日期 : 2023-07-15 20:24

我真好奇,你們貼這些都是為了什麼


十分佩服貼程式碼者的編程能力

不過如果只貼心得不貼程式碼就更好了呵

不貼程式碼的話怎麼讓別人抄到 1700 多題呢

確實,因為本身是出題者看得到程式碼

樓上幾位回覆的 puiching 學生每題都是用抄的,還連同註解一起抄

他們自己就是抄題者,卻說出某些言論,看到也是覺得蠻有趣的

 
#36375: Re: java


1360467-8@g.puiching.edu.mo (三國迷李牧粉)

學校 : 不指定學校
編號 : 189084
來源 : [202.86.172.163]
最後登入時間 :
2023-10-20 12:55:38
l033. 大數除法 -- 不是我的題 | From: [60.246.55.83] | 發表日期 : 2023-07-15 21:14

抱歉各位,我保證以後永遠不再抄題了,感謝各位指出我的錯誤。

 

 
#36518: Re: java


cpp123 (test.cpp)

學校 : 國立雲林科技大學
編號 : 199101
來源 : [140.125.84.86]
最後登入時間 :
2024-05-19 16:04:59
l033. 大數除法 -- 不是我的題 | From: [49.217.45.240] | 發表日期 : 2023-07-21 01:56

我真好奇,你們貼這些都是為了什麼


我也很好奇,你們抄了1000多題都是為了什麼

 
ZeroJudge Forum