fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5. char s[100];
  6.  
  7. // 文字列入力
  8. scanf("%s", s);
  9.  
  10. // 1文字ずつチェック
  11. for (int i = 0; i < strlen(s); i++) {
  12. if (s[i] == '1') {
  13. s[i] = 'I';
  14. }
  15. }
  16.  
  17. // 結果出力
  18. printf("%s\n", s);
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5308KB
stdin
Standard input is empty
stdout