結果
| 問題 | No.18 うーさー暗号 | 
| コンテスト | |
| ユーザー |  yamaken1343 | 
| 提出日時 | 2015-11-13 21:43:58 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 225 bytes | 
| コンパイル時間 | 198 ms | 
| コンパイル使用メモリ | 21,248 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-13 14:35:24 | 
| 合計ジャッジ時間 | 648 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 5 WA * 8 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%s",c);
      |         ^~~~~~~~~~~~~
            
            ソースコード
#include<stdio.h>
#include<string.h>
int main(void){
	char c[1050];
	int i,l;
	scanf("%s",c);
	l = strlen(c);
	for(i=0;i<l;i++){
		c[i] -= i+1;
		while(c[i] < 'A'){
			c[i] += 'Z'-'A'+1;
		}
	}
	printf("%s\n",c);
	return 0;
}
            
            
            
        