結果

問題 No.56 消費税
コンテスト
ユーザー momoyuu
提出日時 2022-08-16 14:52:35
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 388 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,959 ms
コンパイル使用メモリ 329,008 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2026-04-19 07:35:03
合計ジャッジ時間 3,485 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:16:17: warning: 'p' is used uninitialized [-Wuninitialized]
   16 |     print(d*(100+p)/100);
      |             ~~~~^~~
main.cpp:7:26: note: in definition of macro 'print'
    7 | #define print(n) cout << n << endl
      |                          ^
main.cpp:15:11: note: 'p' was declared here
   15 |     int d,p;
      |           ^
main.cpp:16:12: warning: 'd' is used uninitialized [-Wuninitialized]
   16 |     print(d*(100+p)/100);
      |           ~^~~~~~~~
main.cpp:7:26: note: in definition of macro 'print'
    7 | #define print(n) cout << n << endl
      |                          ^
main.cpp:15:9: note: 'd' was declared here
   15 |     int d,p;
      |         ^

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

#define ll long long
#define ld long double
#define rep(i,a,b) for (int i = a; i < b; i++)
#define irep(i,a,b) for (int i = a; i > b; i--)
#define print(n) cout << n << endl
#define rup(a,b) (a+b-1)/b

using namespace std;

int main(){
    cout << fixed << setprecision(15);
    
    int d,p;
    print(d*(100+p)/100);
    
    //system("pause");
    return 0;
}
0