結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
TLwiegehtt
|
| 提出日時 | 2015-07-07 02:54:26 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 410 bytes |
| コンパイル時間 | 209 ms |
| コンパイル使用メモリ | 22,144 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-08 01:27:07 |
| 合計ジャッジ時間 | 655 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%d", &N);
| ^~~~~~~~~~~~~~~
main.c:15:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
15 | scanf("%d %s", &T, S);
| ^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
#include <math.h>
int main(void){
int i;
int T,N;
char S[100];
int ok=0, ng=0;
scanf("%d", &N);
for(i=0;i<N;i++){
int correct;
int len;
scanf("%d %s", &T, S);
correct = (int)floor(12*T / 1000);
len = strlen(S);
if(correct >= len ){
ok += len;
}else{
ok += correct;
ng += (len-correct);
}
}
printf("%d %d\n", ok, ng);
return 0;
}
TLwiegehtt