結果

問題 No.928 軽減税率?
ユーザー CleyLCleyL
提出日時 2019-11-22 22:17:30
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 393 bytes
コンパイル時間 529 ms
コンパイル使用メモリ 63,600 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-19 11:46:25
合計ジャッジ時間 4,945 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
10,752 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 TLE -
testcase_03 TLE -
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 3 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 3 ms
5,376 KB
testcase_18 AC 3 ms
5,376 KB
testcase_19 AC 3 ms
5,376 KB
testcase_20 AC 3 ms
5,376 KB
testcase_21 AC 4 ms
5,376 KB
testcase_22 TLE -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:9:20: warning: 'Y' is used uninitialized [-Wuninitialized]
    9 |   for(int i = 1; Y <= Z; i++){
      |                  ~~^~~~
main.cpp:8:7: note: 'Y' was declared here
    8 |   int Y,Z;
      |       ^
main.cpp:9:20: warning: 'Z' is used uninitialized [-Wuninitialized]
    9 |   for(int i = 1; Y <= Z; i++){
      |                  ~~^~~~
main.cpp:8:9: note: 'Z' was declared here
    8 |   int Y,Z;
      |         ^

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
  int a,b,c;cin>>a>>b>>c;
  double A = (double)(100+a)/100;
  double B = (double)(100+b)/100;
  int ans = 0;
  int Y,Z;
  for(int i = 1; Y <= Z; i++){
    Y = i*A;
    Z = i*B+c;
    if((int)Y < Z){
      //cout << i << ": " << i*A << "(" << Y << ") " << i*B+c << "(" << Z << ")" << endl;
      ans++;
    }
  }
  cout << ans << endl;
  

}
0