結果

問題 No.313 π
ユーザー chuka231
提出日時 2015-12-11 22:07:41
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 644 bytes
コンパイル時間 610 ms
コンパイル使用メモリ 61,880 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-15 08:26:40
合計ジャッジ時間 2,015 ms
ジャッジサーバーID
(参考情報)
judge6 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 1 WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <string>
#include <iostream>
#include <cmath>
#include <fstream>
using namespace std;

int a[10] = { 1954, 1997, 1985, 1986, 2043, 2082, 2017, 1953, 1962, 2021 };
int b[10];

int main()
{
	char c1, c2;
	c1 = getchar();
	c2 = getchar();

	//cout << c1 << c2 << endl;

	for (int i = 0; i < 20000; i++) {
		char cc;
		cc = getchar();
		b[cc - '0']++;
	}

	int g = 0;
	int l = 0;
	for (int i = 0; i < 10; i++) {
		//cout << a[i] << " - " << b[i] << endl;
		if (a[i] < b[i]) {
			l = i;
		}
		if (a[i] > b[i]) {
			g = i;
		}
	}

	if (l != g) {
		cout << l << " " << g << endl;
	}
	else {
		cout << c1 << " " << 3 << endl;
	}

	return 0;
}
0