結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2015-08-05 03:58:33 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 198 bytes |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 01:22:28 |
| 合計ジャッジ時間 | 473 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d%s",&t,a);t=t*6/500;
| ^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int n,s=0,m=0,t,c;
char a[101];
scanf("%d",&n);
while(n--){
scanf("%d%s",&t,a);t=t*6/500;
c=0;while(a[++c]);
s+=t>c?c:t;m+=c;
}
printf("%d %d\n",s,m-s);
return 0;
}
testestest