結果
| 問題 |
No.18 うーさー暗号
|
| コンテスト | |
| ユーザー |
ふっぴー
|
| 提出日時 | 2017-03-30 16:43:11 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 307 bytes |
| コンパイル時間 | 141 ms |
| コンパイル使用メモリ | 22,912 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-07 03:01:19 |
| 合計ジャッジ時間 | 629 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%s",s);
| ^~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
#define INF 1000000000;
int main(void){
char s[1025];
scanf("%s",s);
int i=0;
while(s[i]!='\0'){
if(s[i]-i%26-1>'A'){
s[i]=s[i]-i%26-1;
}else{
s[i]=s[i]-i%26+25;
}
i++;
}
printf("%s\n",s);
}
ふっぴー