結果
| 問題 |
No.18 うーさー暗号
|
| コンテスト | |
| ユーザー |
つなぎ
|
| 提出日時 | 2017-02-16 14:43:12 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 232 bytes |
| コンパイル時間 | 478 ms |
| コンパイル使用メモリ | 20,992 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-30 00:15:35 |
| 合計ジャッジ時間 | 1,149 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 8 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:11: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[1024]’ [-Wformat=]
5 | scanf("%s",&aa);
| ~^ ~~~
| | |
| | char (*)[1024]
| char *
main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%s",&aa);
| ^~~~~~~~~~~~~~~
ソースコード
#include "stdio.h"
int main(void) {
int i;
char aa[1024];
scanf("%s",&aa);
for(i=0;i<1024;i++){
if(aa[i]=='\0')break;
aa[i]-=i+1;
while(aa[i]<'A'){
aa[i]+=26;
}
}
printf("%s",aa);
return 0;
}
つなぎ