結果

問題 No.313 π
ユーザー threepipes_sthreepipes_s
提出日時 2015-12-06 00:18:28
言語 Java19
(openjdk 21)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 2,561 bytes
コンパイル時間 2,323 ms
コンパイル使用メモリ 82,032 KB
実行使用メモリ 55,048 KB
最終ジャッジ日時 2023-10-12 16:16:39
合計ジャッジ時間 8,399 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
53,356 KB
testcase_01 AC 134 ms
53,024 KB
testcase_02 AC 133 ms
53,264 KB
testcase_03 AC 123 ms
53,160 KB
testcase_04 AC 132 ms
55,048 KB
testcase_05 AC 126 ms
53,376 KB
testcase_06 AC 133 ms
53,352 KB
testcase_07 AC 134 ms
53,244 KB
testcase_08 AC 132 ms
53,248 KB
testcase_09 AC 134 ms
53,220 KB
testcase_10 AC 133 ms
53,320 KB
testcase_11 AC 133 ms
53,500 KB
testcase_12 AC 133 ms
51,232 KB
testcase_13 AC 123 ms
53,164 KB
testcase_14 AC 132 ms
53,232 KB
testcase_15 AC 134 ms
53,232 KB
testcase_16 AC 134 ms
53,428 KB
testcase_17 AC 136 ms
53,036 KB
testcase_18 AC 132 ms
53,008 KB
testcase_19 AC 133 ms
53,052 KB
testcase_20 AC 132 ms
53,316 KB
testcase_21 AC 132 ms
53,088 KB
testcase_22 AC 132 ms
52,916 KB
testcase_23 AC 133 ms
53,060 KB
testcase_24 AC 132 ms
53,124 KB
testcase_25 AC 132 ms
53,116 KB
testcase_26 AC 124 ms
53,476 KB
testcase_27 AC 123 ms
53,216 KB
testcase_28 AC 131 ms
53,160 KB
testcase_29 AC 130 ms
53,220 KB
testcase_30 AC 131 ms
53,064 KB
testcase_31 AC 134 ms
53,000 KB
testcase_32 AC 133 ms
53,080 KB
testcase_33 AC 123 ms
53,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
 
public class Main {
	public static void main(String[] args) throws NumberFormatException,
	IOException {Solve solve = new Solve();solve.solve();}
}
class Solve{
	void solve() throws NumberFormatException, IOException{
		ContestScanner in = new ContestScanner();
		Writer out = new Writer();
		int[] num = {
				20104,
				20063,
				19892,
				20011,
				19874,
				20199,
				19898,
				20163,
				19956,
				19841,	
		};
		char[] pi = in.nextToken().replace("\\.", "").toCharArray();
		for(int i=0; i<pi.length; i++){
			if(pi[i]=='.') continue;
			num[pi[i]-'0']--;
		}
		for(int i=0; i<10; i++){
			if(num[i]<0)System.out.print(i+" ");
		}
		for(int i=0; i<10; i++){
			if(num[i]>0) System.out.println(i);
		}
	}
}
 
class MultiSet<T> extends HashMap<T, Integer>{
	@Override
	public Integer get(Object key){return containsKey(key)?super.get(key):0;}
	public void add(T key,int v){put(key,get(key)+v);}
	public void add(T key){put(key,get(key)+1);}
}
class Timer{
	long time;
	public void set(){time = System.currentTimeMillis();}
	public long stop(){return System.currentTimeMillis()-time;}
}
class Writer extends PrintWriter{
	public Writer(String filename) throws IOException
	{super(new BufferedWriter(new FileWriter(filename)));}
	public Writer() throws IOException{super(System.out);}
}
class ContestScanner {
	private BufferedReader reader;
	private String[] line;
	private int idx;
	public ContestScanner() throws FileNotFoundException 
	{reader = new BufferedReader(new InputStreamReader(System.in));}
	public ContestScanner(String filename) throws FileNotFoundException
	{reader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));}
	public String nextToken() throws IOException {
		if (line == null || line.length <= idx) {
			line = reader.readLine().trim().split(" ");
			idx = 0;
		}
		return line[idx++];
	}
	public String readLine() throws IOException{return reader.readLine();}
	public long nextLong() throws IOException, NumberFormatException
	{return Long.parseLong(nextToken());}
	public int nextInt() throws NumberFormatException, IOException
	{return (int) nextLong();}
	public double nextDouble() throws NumberFormatException, IOException 
	{return Double.parseDouble(nextToken());}
}
0