結果

問題 No.671 1000000007
ユーザー AAAAAAAAAAA
提出日時 2018-07-27 21:35:57
言語 C
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 195 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 27,904 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-04 19:34:25
合計ジャッジ時間 2,735 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:9:18: warning: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
    9 |     len = strlen(N);
      |                  ^
      |                  |
      |                  int
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~

ソースコード

diff #

#include <stdio.h>
#include <string.h>

int main(void){
    
    int N,len;
    
    scanf("%d",&N);
    len = strlen(N);
    if(10 - len < 0){
        len = N * -1;
    }
    printf("%d",len);
}
0