結果

問題 No.676 C0nvertPr0b1em
ユーザー sasa
提出日時 2025-03-17 15:06:57
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 28,288 KB
実行使用メモリ 7,324 KB
最終ジャッジ日時 2025-03-17 15:06:59
合計ジャッジ時間 1,672 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%s",str);
      |         ~~~~~^~~~~~~~~~

ソースコード

diff #

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

int main(void){
	char str[1000];
	scanf("%s",str);
	int len = strlen(str);
	
	for(int i = 0;i < len;i ++){
		if(str[i] == 'I' || str[i] == 'l'){
			str[i] = '1';
		}else if(str[i] == 'O' || str[i] == 'o'){
			str[i] = '0';
		}
		printf("%c",str[i]);
	}
	
	
}
0