結果

問題 No.285 消費税2
ユーザー akakimidori
提出日時 2017-04-25 16:01:17
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 20,608 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 08:48:02
合計ジャッジ時間 1,062 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘run’:
main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |   scanf("%lld",&d);
      |   ^~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>

void run(void){
  long long int d;
  scanf("%lld",&d);
  d*=108;
  if(d%100<10){
    printf("%lld.0%lld\n",d/100,d%100);
  } else {
    printf("%lld.%lld\n",d/100,d%100);
  }
  return;
}

int main(void){
  run();
  return 0;
}
0