第十ブルーブリッジボウル個々決勝(ソフトウェアのカテゴリ)\ C言語グループB - 2019インディアン

 

 

 

// 治世文字列
書式#include <stdio.hに>
int型のmain(){
     int型、nは
    scanf("%d",&n);
    char a[] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
    printf("%c%c%c",a[(n/26/26)%26-1],a[(n/26)%26-1],a[n%26-1]);
    return 0;
}  

 

 

 

//数列求值
#include<stdio.h>
#define N 20190325 
int main(){
    int a=1;
    int b=1;
    int c=1;
    int s=0;
    for(int i=4;i<=20190324;i++){
        s=(a+b+c)%10000;
        a = b;
        b = c;
        c = s;
    }
    printf("%d",s);
    return 0;
}       

おすすめ

転載: www.cnblogs.com/Hqx-curiosity/p/12204087.html