제출 #1364275

#제출 시각아이디문제언어결과실행 시간메모리
1364275mythofysRUN Sequence (KAISTRUN26SPRING_B)C++20
100 / 100
0 ms344 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define inf 4000000000000000000
#define mod 998244353
#define siz 524288

ll fibo[200005];

int main()
{
    ll i,j,k,n,m,l,r,ans = 0;
    scanf("%lld %lld %lld",&l,&r,&n);
    fibo[1] = 1;
    fibo[2] = 1;
    for(i=3;i<=50;i++)
    {
        fibo[i] = fibo[i-1] + fibo[i-2];
    }
    if(n >= 50)printf("%lld",l*r);
    else
    {
        printf("%lld",max(0LL,(l - fibo[n-1]) * min(r,fibo[n-2])) + min(l,fibo[n-1]) * r);
    }
}

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'int main()':
Main.cpp:14:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |     scanf("%lld %lld %lld",&l,&r,&n);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…