結果
| 問題 |
No.313 π
|
| ユーザー |
|
| 提出日時 | 2018-03-10 01:07:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 624 bytes |
| コンパイル時間 | 625 ms |
| コンパイル使用メモリ | 72,788 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-11 00:38:38 |
| 合計ジャッジ時間 | 1,905 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 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;
}