結果
問題 |
No.191 供託金
|
ユーザー |
![]() |
提出日時 | 2016-03-24 12:02:47 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 123 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-07 16:14:49 |
合計ジャッジ時間 | 1,166 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 3 RE * 1 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d",&N); | ^~~~~~~~~~~~~~ main.c:14:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%d",&c[i]); | ^~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void){ int i,N; int c[100]; int total=0; int deposit_money=0; scanf("%d",&N); for(i=0;i<N;i++) { scanf("%d",&c[i]); total += c[i]; } for(i=0;i<N;i++) if(((c[i]*100)/total) <= 10) deposit_money += 30; printf("%d",deposit_money); return 0; }