結果
| 問題 |
No.671 1000000007
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2018-04-14 22:08:51 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 172 bytes |
| コンパイル時間 | 593 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 22:37:27 |
| 合計ジャッジ時間 | 1,156 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:12:22: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
12 | printf("%d\n",abs(10-strlen(s)));
| ^~~~~~
main.c:3:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
2 | #include<stdlib.h>
+++ |+#include <string.h>
3 | int main(void)
main.c:12:22: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
12 | printf("%d\n",abs(10-strlen(s)));
| ^~~~~~
main.c:12:22: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
main.c:11:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%s",s);
| ^~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include<stdlib.h>
int main(void)
{
int x,y;
int n;
int a[100];
int i;
int z,q;
char s[20];
scanf("%s",s);
printf("%d\n",abs(10-strlen(s)));
return 0;
}
Haijinn