結果
問題 | No.339 何人が回答したのか |
ユーザー |
![]() |
提出日時 | 2017-07-07 00:48:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 303 bytes |
コンパイル時間 | 1,798 ms |
コンパイル使用メモリ | 165,324 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 03:57:55 |
合計ジャッジ時間 | 3,501 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
#include <bits/stdc++.h> #define REP(i,n,N) for(int i=(n);i<(int) N;i++) #define p(s) cout<<(s)<<endl using namespace std; int main(){ int N; cin>>N; int A[110]; cin>>A[0]; int a=A[0]; REP(i,1,N){ cin>>A[i]; a=__gcd(a,A[i]); } int ans=0; REP(i,0,N){ ans+=A[i]/a; } p(ans); return 0; }