結果
| 問題 | No.544 Delete 7 | 
| コンテスト | |
| ユーザー |  tantei45 | 
| 提出日時 | 2017-08-08 13:20:08 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 395 bytes | 
| コンパイル時間 | 484 ms | 
| コンパイル使用メモリ | 59,440 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-11-21 16:25:48 | 
| 合計ジャッジ時間 | 2,224 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 48 | 
ソースコード
#include <iostream>
#include <cmath>
int count(int n)
{
	int i = 0;
	while(n/=10) i++;
	return i+1;
}
int main()
{
	int N,A,B;
	int cnt,dim,i = 0;
	std::cin >> N;
	cnt = count(N);
	A = B = 0;
	while(cnt--)
	{
		if((dim = N % 10) == 7){
			A += 6*pow(10,i);
			B += 1*pow(10,i);
		}else{
			A += dim*pow(10,i);
		}
		N /= 10;
		i++;
	}
	std::cout << A << ' ' << B << std::endl;
	return 0;
}
            
            
            
        