結果

問題 No.285 消費税2
コンテスト
ユーザー testestest
提出日時 2015-10-18 13:55:21
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
実行時間 -
コード長 67 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 120 ms
コンパイル使用メモリ 28,232 KB
最終ジャッジ日時 2026-02-23 19:33:46
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:1:36: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
    1 | long i;main(){i=atol(gets(&i))*108;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;printf("%ld.%02d",i/100,i%100);}
main.c:1:51: 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;printf("%ld.%02d",i/100,i%100);}
      |                                                ~~~^        ~~~~~
      |                                                   |         |
      |                                                   int       long int
      |                                                %02ld
/usr/bin/ld: /tmp/ccTqoucF.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;printf("%ld.%02d",i/100,i%100);}
0