結果
問題 | No.544 Delete 7 |
ユーザー |
![]() |
提出日時 | 2017-07-14 22:33:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 998 ms / 1,000 ms |
コード長 | 540 bytes |
コンパイル時間 | 1,431 ms |
コンパイル使用メモリ | 166,224 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-07 23:12:36 |
合計ジャッジ時間 | 5,893 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = long long;bool check7(int x) {while (x > 0) {int r = x % 10;if (r == 7) {return true;}x /= 10;}return false;}int main() {cin.tie(0);ios::sync_with_stdio(false);int N;cin >> N;int A = 0;int B;while (true) {A++;B = N - A;if (!check7(A) && !check7(B)) {cout << A << " " << B << endl;return 0;}}return 0;}