結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2015-06-01 09:34:28 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 364 bytes |
| コンパイル時間 | 173 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 13:07:58 |
| 合計ジャッジ時間 | 541 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d", &N);
| ^~~~~~~~~~~~~~~
main.c:8:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d%s", &t, s);
| ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
int i, j, N, t, correct = 0, miss = 0;
char s[101];
scanf("%d", &N);
for(i = 1;i <= N;i++){
scanf("%d%s", &t, s);
j = 0;
while(s[j] != '\0'){
j++;
}
if(12 * t / 1000 >= j)correct += j;
else{
correct += 12 * t / 1000;
miss += j - 12 * t / 1000;
}
}
printf("%d %d\n", correct, miss);
return 0;
}
suppy193