2016年11月10日 星期四

TIOJ 1663 - + - * mod

http://tioj.infor.org/problems/1663

就降(?



 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#include<bits/stdc++.h>
using namespace std;
int main(){
    int t,a,b;
    while(cin>>t>>a>>b){
        if(t==1)cout<<a+b<<endl;
        else if(t==2)cout<<a-b<<endl;
        else if(t==3)cout<<a*b<<endl;
        else cout<<a%b<<endl;
    }
}

沒有留言:

張貼留言