結果
| 問題 | 
                            No.339 何人が回答したのか
                             | 
                    
| コンテスト | |
| ユーザー | 
                             くれちー
                         | 
                    
| 提出日時 | 2016-12-28 15:45:54 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 354 bytes | 
| コンパイル時間 | 197 ms | 
| コンパイル使用メモリ | 25,088 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-15 07:48:24 | 
| 合計ジャッジ時間 | 1,894 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 61 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%d", &n);
      |         ^~~~~~~~~~~~~~~
main.c:8:33: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         for (i = 0; i < n; i++) scanf("%d", &a[i]);
      |                                 ^~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <math.h>
int main() {
	int n;
	scanf("%d", &n);
	int a[100], i, j;
	for (i = 0; i < n; i++) scanf("%d", &a[i]);
	for (i = 1; ; i++) {
		int f = 0;
		for (j = 0; j < n; j++) {
			float t = i * (a[j] / 100.0);
			if (ceil(t) != floor(t)) {
				f = 1;
				break;
			}
		}
		if (!f) {
			printf("%d\n", i);
			return 0;
		}
	}
}
            
            
            
        
            
くれちー