結果

問題 No.687 E869120 and Constructing Array 1
ユーザー maicune
提出日時 2019-09-02 15:07:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 194 bytes
コンパイル時間 3,991 ms
コンパイル使用メモリ 158,500 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-15 21:09:25
合計ジャッジ時間 2,149 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:19: warning: ‘y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   10 |     cout<<x<<' '<<y<<endl;
      |                   ^
main.cpp:10:14: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   10 |     cout<<x<<' '<<y<<endl;
      |              ^~~

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,x,y;
    cin>>n;
    for(int i=1;i<n;++i){
        x=i,y=n-x;
        if(x<=10&&y<=10)break;
    }
    cout<<x<<' '<<y<<endl;
}
0