結果
問題 |
No.313 π
|
ユーザー |
|
提出日時 | 2016-03-30 19:14:18 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 732 bytes |
コンパイル時間 | 601 ms |
コンパイル使用メモリ | 59,996 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-02 08:15:52 |
合計ジャッジ時間 | 2,205 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
#include <iostream> #include <string> #include <vector> std::string input; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); std::vector<int> rightCount({20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841}); std::vector<int> count(10, 0); std::cin >> input; const int piLen = 200002; for(int i=0; i<piLen; ++i){ if(input[i]=='.') continue; ++count[input[i]-'0']; } for(int i=0; i<10; ++i){ if(rightCount[i]<count[i]){ std::cout << i << " "; break; } } for(int i=0; i<10; ++i){ if(rightCount[i]>count[i]){ std::cout << i << "\n"; break; } } return 0; }