結果

問題 No.544 Delete 7
コンテスト
ユーザー くれちー
提出日時 2016-12-22 17:16:50
言語 C90(gcc15)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 5 ms / 1,000 ms
コード長 336 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 168 ms
コンパイル使用メモリ 39,408 KB
最終ジャッジ日時 2026-02-23 23:56:49
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main() {
	char n[11];
	scanf("%s", n);
	int len = strlen(n);

	char a[11], b[11];
	int i;
	for (i = 0; i < len; i++) {
		if (n[i] == '7') {
			a[i] = '1';
			b[i] = '6';
		}
		else {
			a[i] = '0';
			b[i] = n[i];
		}
	}

	printf("%d %d\n", atoi(a), atoi(b));
	return 0;
}
0