結果
問題 | No.313 π |
ユーザー |
👑 |
提出日時 | 2022-07-22 09:41:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 15 ms / 5,000 ms |
コード長 | 496 bytes |
コンパイル時間 | 836 ms |
コンパイル使用メモリ | 72,912 KB |
最終ジャッジ日時 | 2025-01-30 11:36:46 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int x[10] = {20104,20063,19892,20011,19874,20199,19898,20163,19956,19841}; string s;cin>>s; vector<int> A(11); for(int i = 0; s.size() > i; i++){ if(s[i] == '.')continue; A[s[i]-'0']++; } pair<int,int> ans; for(int i = 0; 10 > i; i++){ if(x[i]-A[i] == -1)ans.first = i; if(x[i]-A[i] == 1)ans.second = i; } cout << ans.first << " " << ans.second << endl; }