結果
問題 |
No.933 おまわりさんこいつです
|
ユーザー |
![]() |
提出日時 | 2020-04-25 22:40:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 19 ms / 2,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 1,565 ms |
コンパイル使用メモリ | 167,852 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 00:05:38 |
合計ジャッジ時間 | 2,588 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=(0);i<(n);i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector<ll> p(n); rep(i, n) cin >> p[i]; ll ans = 1; rep(i, n){ if(p[i] % 9 == 0 && p[i] != 0){ ans *= 9; }else{ ans *= p[i] % 9; } if(ans % 9 == 0 && ans != 0){ ans = 9; }else{ ans %= 9; } } cout << ans << endl; }