結果
| 問題 | 
                            No.676 C0nvertPr0b1em
                             | 
                    
| コンテスト | |
| ユーザー | 
                             sk3388607083
                         | 
                    
| 提出日時 | 2018-06-26 14:53:57 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 262 bytes | 
| コンパイル時間 | 191 ms | 
| コンパイル使用メモリ | 22,784 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-23 12:50:19 | 
| 合計ジャッジ時間 | 1,077 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 4 WA * 26 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:11: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[1001]’ [-Wformat=]
    6 |   scanf("%s", &S);
      |          ~^   ~~
      |           |   |
      |           |   char (*)[1001]
      |           char*
main.cpp:6:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |   scanf("%s", &S);
      |   ~~~~~^~~~~~~~~~
            
            ソースコード
#include<stdio.h>
int main(void){
  int i;
  char S[1001];
  scanf("%s", &S);
  for(i = 0; S[i] != '\0'; i++){
    if(S[i] == 'I' || S[i] == 'i')
      S[i] = '1';
    else if(S[i] == 'O' || S[i] == 'o')
      S[i] = '0';
  }
  printf("%s\n", S);
  return 0;
}
            
            
            
        
            
sk3388607083