結果
問題 |
No.339 何人が回答したのか
|
ユーザー |
|
提出日時 | 2016-11-29 00:24:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 501 bytes |
コンパイル時間 | 596 ms |
コンパイル使用メモリ | 82,324 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 12:51:50 |
合計ジャッジ時間 | 2,067 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 61 |
ソースコード
#define _USE_MATH_DEFINES #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include<iomanip> //#include<bits/stdc++.h> using namespace std; int gcd(int x,int y){ return y?gcd(y,x%y):0; } int main() { int n; cin>>n; vector<int>p(n); int y=100; for(int i=0;i<n;i++){ int g; cin>>g; y=gcd(y,g); } cout<<y<<endl; return 0; }