1 条题解

  • 0
    @ 2024-12-26 17:11:21

    C :

    #include <stdio.h>
    int main() {
        printf("I must not fear.\n");
        printf("Fear is the mind-killer.\n");
        printf("Fear is the little-death that\n");
        printf("brings total obliteration.\n\n");
    
        printf("I will face my fear.\n");
        printf("I will permit it to pass over me\n");
        printf("and through me.\n\n");
    
        printf("And when it has gone past,\n");
        printf("I will turn the inner eye\n");
        printf("to see its path.\n\n");
    
        printf("Where the fear has gone,\n");
        printf("there will be nothing.\n");
        printf("Only I will remain.\n");
        return 0;
    }
    
    

    C++ :

    #include <bits/stdc++.h>
    #define int long long
    using namespace std;
    const int N=1e6+10;
    typedef pair<int,int> PII;
    typedef priority_queue<int , vector<int>, greater<int>> minqueue;  //从小到大 queue
    typedef priority_queue<int, vector<int>, less<int>> maxqueue;      //从大到小 queue
    
    int gcd(int a, int b){  //最大公因数 
        return b ? gcd(b, a % b) : a;
    }
    
    int lcm(int a, int b){ //最小公倍数 
        return a * b / __gcd(a, b);
    }
    
    int qmi(int base, int power, int p)  //快速幂求余 
    {
    	int result = 1;   
    	while (power > 0)           
    	{
    		if (power & 1)         							
    			result = result * base % p;   
    		base = base * base % p ;       						
    		power >>= 1;         						
    	}
    	return result % p;       
    }
    
    void solve()
    {
    	cout<<"I must not fear.Fear is the mind-killer.Fear is the little-death that brings total obliteration.";
    }
    
    signed main()
    {
    	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    	int t;
    	t=1;
    	cin>>t; 
    	while(t--)     
    	{
    		solve();
    	}
    	return 0;
    }
    
    • 1

    信息

    ID
    725
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    提交数
    2
    已通过
    2
    上传者