結果

問題 No.544 Delete 7
ユーザー beet
提出日時 2017-07-14 22:25:40
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 1,360 ms
コンパイル使用メモリ 159,840 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-07 22:53:03
合計ジャッジ時間 5,002 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 39 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int n;
  cin>>n;
  for(int a=-1000000;a<1000000;a++){
    int b=n-a;
    string s=to_string(abs(a)),t=to_string(abs(b));
    if(count(s.begin(),s.end(),'7')||count(t.begin(),t.end(),'7')) continue;
    cout<<a<<" "<<b<<endl;
    return 0;
  }
  return 0;
}
0