結果
| 問題 | No.544 Delete 7 | 
| コンテスト | |
| ユーザー |  くれちー | 
| 提出日時 | 2016-12-22 17:21:48 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 336 bytes | 
| コンパイル時間 | 117 ms | 
| コンパイル使用メモリ | 21,632 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-21 15:56:24 | 
| 合計ジャッジ時間 | 1,946 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 48 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%s", n);
      |         ^~~~~~~~~~~~~~
            
            ソースコード
#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] = '6';
			b[i] = '1';
		}
		else {
			a[i] = n[i];
			b[i] = '0';
		}
	}
	printf("%d %d\n", atoi(a), atoi(b));
	return 0;
}
            
            
            
        