Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159502 解禾溪 09优惠活动 C++ Compile Error 0 MS 0 KB 512 2026-09-04 19:06:54

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,b,P,G,S; cin>>a>>b; if(b=P){ cout<<a<<a*0.7; } else if(b=G){ cout<<a<<a*0.8; } else if(b=S){ cout<<a<<a*0.9; } else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){ cout<<a<<a*0.95; } return 0;


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     if(b=P){
           ^
Main.cc:13:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  else if(b=G){
             ^
Main.cc:16:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  else if(b=S){
             ^
Main.cc:19:12: error: 'A' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
            ^
Main.cc:19:14: error: 'B' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
              ^
Main.cc:19:16: error: 'C' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                ^
Main.cc:19:18: error: 'D' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                  ^
Main.cc:19:20: error: 'E' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                    ^
Main.cc:19:22: error: 'F' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                      ^
Main.cc:19:24: error: 'H' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                        ^
Main.cc:19:26: error: 'I' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                          ^
Main.cc:19:28: error: 'J' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                            ^
Main.cc:19:30: error: 'K' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                              ^
Main.cc:19:32: error: 'L' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                ^
Main.cc:19:34: error: 'M' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                  ^
Main.cc:19:36: error: 'N' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                    ^
Main.cc:19:38: error: 'O' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                      ^
Main.cc:19:40: error: 'Q' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                        ^
Main.cc:19:42: error: 'R' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                          ^
Main.cc:19:44: error: 'T' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                            ^
Main.cc:19:46: error: 'U' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                              ^
Main.cc:19:48: error: 'V' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                                ^
Main.cc:19:50: error: 'W' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                                  ^
Main.cc:19:52: error: 'X' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                                    ^
Main.cc:19:54: error: 'Y' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                                      ^
Main.cc:19:56: error: 'Z' was not declared in this scope
  else if(b=A,B,C,D,E,F,H,I,J,K,L,M,N,O,Q,R,T,U,V,W,X,Y,Z){
                                                        ^
Main.cc:22:13: error: expected '}' at end of input
     return 0;
             ^