結果
問題 |
No.313 π
|
ユーザー |
|
提出日時 | 2015-12-08 01:22:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 554 bytes |
コンパイル時間 | 597 ms |
コンパイル使用メモリ | 62,512 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 18:58:30 |
合計ジャッジ時間 | 1,699 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 8 WA * 24 |
ソースコード
#include <string> #include <iostream> #include <cmath> #include <fstream> using namespace std; int a[10] = { 1954, 1997, 1986, 1986, 2043, 2082, 2017, 1953, 1962, 2020 }; int b[10]; int main() { char c1,c2; cin >> c1; cin >> c2; for (int i = 0; i < 20000; i++) { char ch; cin >> ch; b[ch - '0']++; } int g = 0; int l = 0; for (int i = 0; i < 10; i++) { if (a[i] < b[i]) { l = i; } if (a[i] > b[i]) { g = i; } } if (l != g) { cout << g << " " << l << endl; } else { cout << c1 << " " << 3 << endl; } return 0; }