結果
| 問題 | No.35 タイパー高橋 |
| コンテスト | |
| ユーザー |
tsuishi
|
| 提出日時 | 2022-03-07 13:09:34 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 304 bytes |
| 記録 | |
| コンパイル時間 | 65 ms |
| コンパイル使用メモリ | 25,652 KB |
| 最終ジャッジ日時 | 2026-02-22 08:55:06 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | scanf("%d",&n);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | // Yukicoder №35 タイパー高橋
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
7 | scanf("%d",&n);
| ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:29: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
10 | sum += len =strlen(str);
| ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
+++ |+#include <string.h>
1 | // Yukicoder №35 タイパー高橋
main.c:10:29: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
10 | sum += len =strlen(str);
| ^~~~~~
main.c:10:29: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:15:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
15 | printf("%d %d\n",ok,sum - ok);
| ^~~~~~
main.c:15:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:15:9: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
// Yukicoder №35 タイパー高橋
int main(){
int n,t;
char str[101];
int len,able,ok=0,sum=0;
scanf("%d",&n);
while(n--){
scanf("%d%s",&t,str);
sum += len =strlen(str);
able = ( t / (1000. / 12.) );
if( able >= len ) ok += len;
else ok += able;
}
printf("%d %d\n",ok,sum - ok);
}
tsuishi