結果
| 問題 | No.313 π |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-11 21:57:38 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 822 bytes |
| 記録 | |
| コンパイル時間 | 1,019 ms |
| コンパイル使用メモリ | 174,472 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-04-04 18:39:01 |
| 合計ジャッジ時間 | 1,776 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 |
ソースコード
#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;
}