結果
| 問題 | No.341 沈黙の期間 |
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2016-12-13 20:49:04 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 208 bytes |
| 記録 | |
| コンパイル時間 | 95 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 01:30:05 |
| 合計ジャッジ時間 | 1,050 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 1 WA * 8 RE * 2 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:12:19: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
12 | for(i=0;i<strlen(a);i++){
| ^~~~~~
main.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
1 | #include <stdio.h>
+++ |+#include <string.h>
2 |
main.c:12:19: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
12 | for(i=0;i<strlen(a);i++){
| ^~~~~~
main.c:12:19: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%s",a);
| ^~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void)
{
char a[100];
int i;
int q=0;
int w=0;
scanf("%s",a);
for(i=0;i<strlen(a);i++){
if(a[i]=='.'){
q++;
}
}
w=q/3;
printf("%d\n",w);
return 0;
}
Haijinn