結果
問題 |
No.313 π
|
ユーザー |
|
提出日時 | 2018-03-10 01:07:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 5,000 ms |
コード長 | 625 bytes |
コンパイル時間 | 599 ms |
コンパイル使用メモリ | 72,764 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 00:39:46 |
合計ジャッジ時間 | 1,922 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
#include <iostream> #include <fstream> #include <algorithm> #include <vector> using namespace std; int main(){ int number_count[10] = {20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841}; string input_pi; cin >> input_pi; number_count[input_pi[0] - '0']--; for(int i = 2; i < 2e5 + 2; i++){ number_count[input_pi[i] - '0']--; } int before = -1, after = -1; for(int i = 0; i < 10; i++){ if(number_count[i] == -1){ before = i; }else if(number_count[i]){ after = i; } } cout << before << " " << after << endl; }