結果

問題 No.339 何人が回答したのか
ユーザー imulan
提出日時 2016-02-03 17:12:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 597 bytes
コンパイル時間 1,292 ms
コンパイル使用メモリ 158,824 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-21 20:09:40
合計ジャッジ時間 2,948 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 61
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);++i)
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++)
#define mp make_pair
#define pb push_back
#define fi first
#define sc second

int main(int argc, char const *argv[]) {
  int n;
  cin >>n;
  vector<int> a(n);
  rep(i,n) cin >>a[i];

  int ans=-1;
  for(int s=1; s<=1000; ++s){
    bool valid=true;
    rep(j,n){
      if((a[j]*s)%100 != 0) valid=false;
    }
    if(valid){
      ans=s;
      break;
    }
  }

  std::cout << ans << std::endl;
  return 0;
}
0