結果
問題 |
No.933 おまわりさんこいつです
|
ユーザー |
![]() |
提出日時 | 2019-11-29 22:09:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 486 bytes |
コンパイル時間 | 6,859 ms |
コンパイル使用メモリ | 379,836 KB |
実行使用メモリ | 12,376 KB |
最終ジャッジ日時 | 2024-11-20 23:21:51 |
合計ジャッジ時間 | 21,126 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 TLE * 4 |
ソースコード
#include <bits/stdc++.h> #include <boost/multiprecision/cpp_int.hpp> using namespace std; namespace mp = boost::multiprecision; int main(){ int N; cin >> N; vector<mp::cpp_int> P(N); mp::cpp_int A = 1; for (int i = 0; i < N; i++) { cin >> P[i]; A *= P[i]; } while (A >= 10) { mp::cpp_int B = 0; while (A > 0) { B += A%10; A /= 10; } A = B; } cout << A << endl; return 0; }