結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-16 18:32:53 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 469 bytes |
| コンパイル時間 | 170 ms |
| コンパイル使用メモリ | 21,632 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-01 06:49:53 |
| 合計ジャッジ時間 | 863 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%hd", &n);
| ^~~~~~~~~~~~~~~~
main.c:11:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%hd %s", &t, s);
| ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
short n, t, correct, miss;
char s[100];
float h = (float)1000 / 12;
short i, j;
scanf("%hd", &n);
for(i = 0; i < n; i++){
scanf("%hd %s", &t, s);
for(j = 0; s[j]; j++);
if(t / h > j)
correct += j;
else
correct += t / h;
if(9 - (t / h) > 0){
miss += j - (t / h);
if(j - (t / h) - (int)(j - (t / h)))
miss++;
}
}
printf("%hd %hd\n", correct, miss);
return 0;
}