답안 #425464

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
425464 2021-06-13T04:07:14 Z errorgorn Palindromic FizzBuzz (NOI19_palindrome) C++17
0 / 100
1 ms 332 KB
#include <cstdio>
using namespace std;
long long a,b,s,e;
int main(){
    scanf("%lld%lld%lld%lld",&s,&e,&a,&b);
    for (long long x=s;x<=e;x++){
        if (x%a==0 && x%b==0) printf("FizzBuzz\n");
        else if (x%a==0) printf("Fizz\n");
        else if (x%b==0) printf("Buzz\n");
        else printf("%lld\n",x);
    }
}

Compilation message

palindrome.cpp: In function 'int main()':
palindrome.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    5 |     scanf("%lld%lld%lld%lld",&s,&e,&a,&b);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -