2012年7月6日金曜日

AOJ Volume5 0543:Receipt

/********************************
*    2012/07/03                    *
*    AOJ Volume5 0543            *
*    Receipt                        *
*    crane                        *
*********************************/

#include<iostream>
using namespace std;


int main(){

    int s = 0;
    while(cin >> s, s){    //総額=0で終了
        for(int i=0; i<9; i++){
            int pri=0;
            cin >> pri;
            s = s - pri;
        }
        cout << s << endl;
    }
    return 0;
}

0 件のコメント:

コメントを投稿