結果

問題 No.933 おまわりさんこいつです
ユーザー toto6114
提出日時 2019-11-30 00:08:27
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 528 bytes
コンパイル時間 754 ms
コンパイル使用メモリ 92,328 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-21 00:22:05
合計ジャッジ時間 1,742 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<set>
#include<map>
#include<queue>
#include<vector>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
int main() {
  cin.tie(0),cout.tie(0);
  ios::sync_with_stdio(false);
  ll n,p[100005]={},ans=1,cnt=0,x,A=0;
  cin >> n;
  for(int i=0; i<n; i++) {
    cin >> p[i];
    x=p[i];
    cnt=0;
    while(x>0) {
      cnt+=x%10;
      x/=10;
    }
    ans*=cnt;
  }
  while(ans>0) {
    A+=ans%10;
    ans/=10;
  }
  cout << A << endl;
}
0