結果
問題 | No.933 おまわりさんこいつです |
ユーザー |
|
提出日時 | 2019-11-29 22:38:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 73 ms / 2,000 ms |
コード長 | 374 bytes |
コンパイル時間 | 501 ms |
コンパイル使用メモリ | 63,232 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-20 23:39:20 |
合計ジャッジ時間 | 1,612 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include<iostream> using namespace std; typedef long long ll; void fold(ll &x){ while(x >= 10){ ll tmp = 0; while(x) tmp += x%10, x/=10; x = tmp; } } int main(){ int n; cin >> n; ll x = 1; for(int i = 0; i < n; i++){ ll y; cin >> y; x *= y; fold(x); } cout << x << endl; return 0; }