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');
		}
	}
}

posted @ 2020-03-01 20:26  dgklr  阅读(105)  评论(0编辑  收藏  举报