結果
| 問題 |
No.369 足し間違い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-18 00:21:25 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 166 bytes |
| コンパイル時間 | 95 ms |
| コンパイル使用メモリ | 19,840 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-26 03:29:06 |
| 合計ジャッジ時間 | 582 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
コンパイルメッセージ
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("%d",&n);
| ^~~~~~~~~~~~~~
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("%d",&ya);s+=ya;}
| ^~~~~~~~~~~~~~~
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d",&ya);printf("%d\n",s-ya);
| ^~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(void){
int n,i,ya,s=0;
scanf("%d",&n);
for(i = 1;i <= n;i++){scanf("%d",&ya);s+=ya;}
scanf("%d",&ya);printf("%d\n",s-ya);
return 0;
}