結果
| 問題 |
No.476 正しくない平均
|
| ユーザー |
|
| 提出日時 | 2017-02-07 00:10:50 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 210 bytes |
| コンパイル時間 | 670 ms |
| コンパイル使用メモリ | 20,096 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 08:44:42 |
| 合計ジャッジ時間 | 1,695 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%llu%llu",&n,&a);
| ^~~~~~~~~~~~~~~~~~~~~~~
main.c:6:31: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | for(i = 1;i <= n;i++){scanf("%llu",&m);s+=m;}
| ^~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(void){
unsigned long long int n,a,s=0,m,i;
scanf("%llu%llu",&n,&a);
for(i = 1;i <= n;i++){scanf("%llu",&m);s+=m;}
if(n*a == s){printf("YES\n");}else{printf("NO\n");}
return 0;
}