SGU 刷题记

SGU 刷题记


SGU 105
Solution: 略
code:

#include<bits/stdc++.h>
using namespace std;
int n;
int main(){
    cin >> n; n --;
    cout << n - n / 3 << endl;
}


SGU 107
Solution: 一道神题。找规律
code:

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    if (n <= 8) cout << 0 << endl;
    else{
        if (n == 9)
            cout << 8;
        else{
            cout << 72;
            for (int i=1;i<=n-10;i++)
                putchar('0');
        }
    }
}

猜你喜欢

转载自www.cnblogs.com/dgklr/p/12391807.html
sgu
今日推荐