結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-30 00:10:36 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 557 bytes |
| コンパイル時間 | 793 ms |
| コンパイル使用メモリ | 92,980 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-21 00:22:18 |
| 合計ジャッジ時間 | 1,800 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 16 |
ソースコード
#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;
}
while(A>9) {
A-=9;
}
cout << A << endl;
}