結果
問題 | No.313 π |
ユーザー |
![]() |
提出日時 | 2020-09-24 22:54:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 5,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 840 ms |
コンパイル使用メモリ | 67,072 KB |
最終ジャッジ日時 | 2025-01-14 20:10:45 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
#include <iostream>using namespace std;int main(){string S;cin >> S;int cnt[10] = {20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841};for (auto c : S){int i = c - '0';if (i >= 0 and i < 10) cnt[i]--;}string ret = "0 0\n";for (int i = 0; i < 10; i++){if (cnt[i] < 0) ret[0] += i;if (cnt[i] > 0) ret[2] += i;}cout << ret;}