結果

問題 No.671 1000000007
ユーザー weizen
提出日時 2018-04-14 06:26:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 143 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 23,040 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 22:07:20
合計ジャッジ時間 715 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 3 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
    7 |    printf("%d\n",strlen(str)-strlen("1000000007"));
      |            ~^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |             |               |
      |             int             size_t {aka long unsigned int}
      |            %ld
main.cpp:6:9: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |    scanf("%s",str);
      |    ~~~~~^~~~~~~~~~

ソースコード

diff #

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

int main(){
   char str[100];
   scanf("%s",str);
   printf("%d\n",strlen(str)-strlen("1000000007"));
}
0