結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2015-08-08 21:13:04 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 142 bytes |
| コンパイル時間 | 266 ms |
| コンパイル使用メモリ | 19,840 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-18 09:24:48 |
| 合計ジャッジ時間 | 960 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:1: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
4 | gets(a);gets(a+7);
| ^~~~
main.c:6:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
6 | printf("%d",s);
| ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | int main(){
main.c:6:1: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
6 | printf("%d",s);
| ^~~~~~
main.c:6:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
/usr/bin/ld: /tmp/cc6Ah74R.o: in function `main':
main.c:(.text.startup+0x22): 警告: the `gets' function is dangerous and should not be used.
ソースコード
int main(){
char a[15];
int s=0,n=0,i;
gets(a);gets(a+7);
for(i=0;i<15;i++)if(a[i]==111){n++;s=s<n?n:s;}else{n=0;}
printf("%d",s);
return 0;
}
testestest