結果
| 問題 | No.341 沈黙の期間 |
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2016-12-13 20:49:04 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 208 bytes |
| 記録 | |
| コンパイル時間 | 221 ms |
| コンパイル使用メモリ | 40,196 KB |
| 最終ジャッジ日時 | 2026-02-23 23:48:59 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 1 WA * 8 RE * 2 |
コンパイルメッセージ
main.c: In function 'main':
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:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
1 | #include <stdio.h>
+++ |+#include <string.h>
2 |
ソースコード
#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