結果

問題 No.313 π
ユーザー NekosyndromeNekosyndrome
提出日時 2015-12-11 21:57:38
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 822 bytes
コンパイル時間 1,104 ms
コンパイル使用メモリ 143,732 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-13 11:27:18
合計ジャッジ時間 2,588 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,352 KB
testcase_01 AC 3 ms
4,348 KB
testcase_02 AC 3 ms
4,352 KB
testcase_03 AC 3 ms
4,348 KB
testcase_04 AC 3 ms
4,348 KB
testcase_05 AC 3 ms
4,352 KB
testcase_06 AC 3 ms
4,352 KB
testcase_07 AC 3 ms
4,352 KB
testcase_08 AC 3 ms
4,352 KB
testcase_09 AC 3 ms
4,352 KB
testcase_10 AC 3 ms
4,348 KB
testcase_11 AC 3 ms
4,352 KB
testcase_12 AC 3 ms
4,348 KB
testcase_13 AC 3 ms
4,348 KB
testcase_14 AC 3 ms
4,348 KB
testcase_15 AC 3 ms
4,348 KB
testcase_16 AC 3 ms
4,348 KB
testcase_17 AC 3 ms
4,348 KB
testcase_18 AC 3 ms
4,348 KB
testcase_19 AC 3 ms
4,352 KB
testcase_20 AC 3 ms
4,352 KB
testcase_21 AC 3 ms
4,352 KB
testcase_22 AC 3 ms
4,348 KB
testcase_23 AC 3 ms
4,348 KB
testcase_24 AC 3 ms
4,352 KB
testcase_25 AC 3 ms
4,348 KB
testcase_26 AC 3 ms
4,352 KB
testcase_27 AC 3 ms
4,348 KB
testcase_28 AC 3 ms
4,348 KB
testcase_29 AC 3 ms
4,352 KB
testcase_30 AC 3 ms
4,348 KB
testcase_31 AC 3 ms
4,352 KB
testcase_32 AC 3 ms
4,348 KB
testcase_33 AC 3 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define REP(x,y,z) for(int x=y;x<=z;x++)
#define FORD(x,y,z) for(int x=y;x>=z;x--)
#define MSET(x,y) memset(x,y,sizeof(x))
#define FOR(x,y) for(__typeof(y.begin()) x=y.begin();x!=y.end();x++)
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define SZ size()
#define M 200005
void RI(){}
template<typename... T>
void RI( int& head, T&... tail ) {
    scanf("%d",&head);
    RI(tail...);
}
using namespace std;
typedef long long LL;
int cnt[10]={20104,20063,19892,20011,19874,20199,19898,20163,19956,19841};
int cnt2[10];
char in[M];
int a1,a2;
int n;
int main()
{
	scanf("%s",in);
	n = strlen(in);
	REP(i,0,n-1) if(in[i]>='0' && in[i]<='9') cnt2[in[i]-'0']++;

	REP(i,0,9)
	{
		if(cnt[i]>cnt2[i]) a2=i;
		if(cnt2[i]>cnt[i]) a1=i;
	}
	printf("%d %d\n",a1,a2);
	return 0;
}
0