結果
| 問題 |
No.339 何人が回答したのか
|
| コンテスト | |
| ユーザー |
y_mazun
|
| 提出日時 | 2016-01-29 22:24:38 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 504 bytes |
| コンパイル時間 | 297 ms |
| コンパイル使用メモリ | 42,368 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-21 17:57:40 |
| 合計ジャッジ時間 | 1,862 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 61 |
コンパイルメッセージ
main.cpp: In function ‘int getInt()’:
main.cpp:5:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | inline int getInt(){ int s; scanf("%d", &s); return s; }
| ~~~~~^~~~~~~~~~
ソースコード
#include <queue>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#include <cstdio>
inline int getInt(){ int s; scanf("%d", &s); return s; }
#include <set>
using namespace std;
int main(){
const int n = getInt();
vector<int> a(n);
REP(i,n) a[i] = getInt();
for(int i = 1; i <= 100; i++){
if(100 % i != 0) continue;
const int k = 100 / i;
bool ok = true;
REP(j,n) if(a[j] % k != 0)
ok = false;
if(ok){
printf("%d\n", i);
return 0;
}
}
return 0;
}
y_mazun