結果
問題 | No.313 π |
ユーザー | threepipes_s |
提出日時 | 2015-12-06 00:18:28 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 150 ms / 5,000 ms |
コード長 | 2,561 bytes |
コンパイル時間 | 2,478 ms |
コンパイル使用メモリ | 84,344 KB |
実行使用メモリ | 40,496 KB |
最終ジャッジ日時 | 2024-09-14 14:54:45 |
合計ジャッジ時間 | 8,768 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 144 ms
40,160 KB |
testcase_01 | AC | 146 ms
40,380 KB |
testcase_02 | AC | 145 ms
40,032 KB |
testcase_03 | AC | 144 ms
40,088 KB |
testcase_04 | AC | 142 ms
40,320 KB |
testcase_05 | AC | 144 ms
40,172 KB |
testcase_06 | AC | 144 ms
40,236 KB |
testcase_07 | AC | 148 ms
39,948 KB |
testcase_08 | AC | 150 ms
40,072 KB |
testcase_09 | AC | 148 ms
40,316 KB |
testcase_10 | AC | 145 ms
40,172 KB |
testcase_11 | AC | 145 ms
40,320 KB |
testcase_12 | AC | 145 ms
40,364 KB |
testcase_13 | AC | 148 ms
40,112 KB |
testcase_14 | AC | 148 ms
40,188 KB |
testcase_15 | AC | 143 ms
40,012 KB |
testcase_16 | AC | 148 ms
40,328 KB |
testcase_17 | AC | 144 ms
40,088 KB |
testcase_18 | AC | 145 ms
40,200 KB |
testcase_19 | AC | 143 ms
39,928 KB |
testcase_20 | AC | 147 ms
40,136 KB |
testcase_21 | AC | 146 ms
40,096 KB |
testcase_22 | AC | 147 ms
39,952 KB |
testcase_23 | AC | 146 ms
40,116 KB |
testcase_24 | AC | 147 ms
40,076 KB |
testcase_25 | AC | 146 ms
40,140 KB |
testcase_26 | AC | 145 ms
40,180 KB |
testcase_27 | AC | 148 ms
40,228 KB |
testcase_28 | AC | 146 ms
40,188 KB |
testcase_29 | AC | 149 ms
40,244 KB |
testcase_30 | AC | 135 ms
40,368 KB |
testcase_31 | AC | 146 ms
40,332 KB |
testcase_32 | AC | 146 ms
40,496 KB |
testcase_33 | AC | 148 ms
40,072 KB |
ソースコード
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());} }