結果

問題 No.1048 Zero (Advanced)
ユーザー Hydrogen1008Hydrogen1008
提出日時 2020-10-07 19:00:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 1,444 ms
コンパイル使用メモリ 165,168 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-20 03:31:04
合計ジャッジ時間 2,213 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 9 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:12:6: warning: 'L' is used uninitialized [-Wuninitialized]
   12 | if((L*K)%M==0){
      |    ~~^~~
main.cpp:7:15: note: 'L' was declared here
    7 | long long int L;
      |               ^
main.cpp:12:6: warning: 'K' is used uninitialized [-Wuninitialized]
   12 | if((L*K)%M==0){
      |    ~~^~~
main.cpp:10:15: note: 'K' was declared here
   10 | long long int K;
      |               ^
main.cpp:12:9: warning: 'M' is used uninitialized [-Wuninitialized]
   12 | if((L*K)%M==0){
      |    ~~~~~^~
main.cpp:9:15: note: 'M' was declared here
    9 | long long int M;
      |               ^
main.cpp:17:19: warning: 'R' may be used uninitialized [-Wmaybe-uninitialized]
   17 |     if((L*K)/M!=(R*K)/M){
      |                 ~~^~~
main.cpp:8:15: note: 'R' was declared here
    8 | long long int R;
      |               ^

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;


int main() {
    
long long int L;
long long int R;
long long int M;
long long int K;

if((L*K)%M==0){
    cout << "Yes";
}

else{
    if((L*K)/M!=(R*K)/M){
        cout << "Yes"; 
    }
    else{
        cout << "No"; 
    }
}

}
0