結果
問題 |
No.143 豆
|
ユーザー |
👑 ![]() |
提出日時 | 2015-08-06 03:15:23 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 138 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 10:21:05 |
合計ジャッジ時間 | 775 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%d%d%d",&a,&b,&c);a*=b; | ^~~~~~~~~~~~~~~~~~~~~~~~ main.c:5:11: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | while(c--)scanf("%d",&b),a-=b; | ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c);a*=b; while(c--)scanf("%d",&b),a-=b; printf("%d",a<0?-1:a); return 0; }