結果
| 問題 | No.671 1000000007 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-08-28 17:41:34 | 
| 言語 | C (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 2,000 ms | 
| コード長 | 190 bytes | 
| コンパイル時間 | 853 ms | 
| コンパイル使用メモリ | 27,776 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-16 03:51:49 | 
| 合計ジャッジ時間 | 1,460 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 | 
コンパイルメッセージ
main.c: In function 'main':
main.c:10:24: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   10 |         printf("%d\n", abs(strlen(n) - 10));
      |                        ^~~
main.c:5:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    4 | #include <math.h>
  +++ |+#include <stdlib.h>
    5 | 
main.c:10:38: warning: 'abs' argument 1 promotes to 'size_t' {aka 'long unsigned int'} where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
   10 |         printf("%d\n", abs(strlen(n) - 10));
      |                            ~~~~~~~~~~^~~~
<built-in>: note: built-in 'abs' declared here
            
            ソースコード
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <math.h>
int main(void) {
	char n[17];
	scanf("%s", &n);
	printf("%d\n", abs(strlen(n) - 10));
	return 0;
}
            
            
            
        