#26503: C++超暴力解


99980001 (207-07張讓宸)

學校 : 臺北市私立延平高級中學
編號 : 128504
來源 : [203.72.178.2]
最後登入時間 :
2024-10-22 10:35:11
f147. 1. 點餐系統 (Ordering System) -- 2020年6月TOI練習賽新手組 | From: [218.35.155.18] | 發表日期 : 2021-08-10 14:12

#include<bits/stdc++.h> 

using namespace std;

int main(){

int s1,s2,x=0,y=0;

while(y%2==0?cin>>s1:cin>>s2){

if(s1==0)break;

else {

 

if(y%2==1){

if(s1==1){

if(s2==1){

cout<<"Medium Wac 4"<<endl;

x+=4;

}

else if(s2==2){

cout<<"WChicken Nugget 8"<<endl;

x+=8;

}

else if(s2==3){

cout<<"Geez Burger 7"<<endl;

x+=7;

}

else if(s2==4){

cout<<"ButtMilk Crispy Chicken 6"<<endl;

x+=6;

}

else if(s2==5){

cout<<"Plastic Toy 3"<<endl;

x+=3;

}

}

else if(s1==2){

if(s2==1){

cout<<"German Fries 2"<<endl;

x+=2;

}

else if(s2==2){

cout<<"Durian Slices 3"<<endl;

x+=3;

}

else if(s2==3){

cout<<"WcFurry 5"<<endl;

x+=5;

}

else if(s2==4){

cout<<"Chocolate Sunday 7"<<endl;

x+=7;

}

}

}

}

y+=1;

}

cout<<"Total: "<<x<<endl;

}

 
ZeroJudge Forum