結果

問題 No.2624 Prediction by Average
ユーザー umezoumezo
提出日時 2024-02-10 02:14:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 566 bytes
コンパイル時間 2,395 ms
コンパイル使用メモリ 210,608 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2024-02-10 02:14:56
合計ジャッジ時間 3,424 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
6,548 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 60 ms
6,548 KB
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
 
#include<bits/stdc++.h>
using namespace std;
 
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  map<int,int> m;
  for(int a=1000;a<=1000000;a*=10){
    for(int i=1;i<=1000000;i++){
      if(!m.count((a/i)%1000)){
        m[(a/i)%1000]=i;
      }
    }
  }
  int t;
  cin>>t;
  while(t--){
    ll n;
    int x;
    char y;
    int z;
    cin>>n>>x>>y>>z;
    if(!m.count(z)) cout<<0<<endl;
    else cout<<n/m[z]<<endl;
  }
    
  return 0;
}
0