結果
| 問題 | No.536 人工知能 | 
| コンテスト | |
| ユーザー |  Haijinn | 
| 提出日時 | 2017-07-04 23:16:11 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 444 bytes | 
| コンパイル時間 | 110 ms | 
| コンパイル使用メモリ | 23,296 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-05 16:20:39 | 
| 合計ジャッジ時間 | 618 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 11 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 | scanf("%s",s);
      | ^~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include<string.h>
int main(){
char s[11];
int x=0;
int i;
int c=0;
char q[2];
scanf("%s",s);
x=strlen(s);
//printf("%d\n",x);
//printf("!\n");
i=x-2;
if(s[i]=='a'&&s[i+1]=='i'){
	c=1;
	
}
//printf("%d\n",c);
if(c==1){
	//printf("!\n");
	for(i=0;i<x-2;i++){
		printf("%c",s[i]);
		
		
		
		
		
		
		
	}
	printf("AI\n");
	
	
}else if(c==0){
	
	printf("%s-AI\n",s);
	
	
}
	return 0;
	
}
            
            
            
        