結果

問題 No.285 消費税2
コンテスト
ユーザー testestest
提出日時 2015-10-18 13:55:30
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
実行時間 -
コード長 70 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 320 ms
コンパイル使用メモリ 28,360 KB
最終ジャッジ日時 2026-02-23 19:33:52
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:1:39: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
    1 | long i;main(){i=atol(gets(&i))*108;i=!printf("%ld.%02d",i/100,i%100);}
      |                                       ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
  +++ |+#include <stdio.h>
    1 | long i;main(){i=atol(gets(&i))*108;i=!printf("%ld.%02d",i/100,i%100);}
main.c:1:54: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    1 | long i;main(){i=atol(gets(&i))*108;i=!printf("%ld.%02d",i/100,i%100);}
      |                                                   ~~~^        ~~~~~
      |                                                      |         |
      |                                                      int       long int
      |                                                   %02ld
/usr/bin/ld: /tmp/cc1QIDQa.o: in function `main':
main.c:(.text.startup+0x12): 警告: the `gets' function is dangerous and should not be used.

ソースコード

diff #
raw source code

long i;main(){i=atol(gets(&i))*108;i=!printf("%ld.%02d",i/100,i%100);}
0