結果
問題 | No.544 Delete 7 |
ユーザー | daradara_sanma |
提出日時 | 2017-07-14 23:15:43 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 389 bytes |
コンパイル時間 | 408 ms |
コンパイル使用メモリ | 60,148 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 16:12:50 |
合計ジャッジ時間 | 2,276 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include<iostream>#include<cstdio>#include<cmath>using namespace std;int main() {int n, a[10] = {};cin >> n;int i = 1, t = n;do{if (t % 10 == 7){a[i] = 1;}i++;t = t / 10;} while (t != 0);int b = 0, c = 0;for (int k = 1; k < 10; k++){if (a[k]>0){b += (int)pow(10, k - 1);}}c = n - b;cout << b << " " << c << endl;return 0;}