結果
| 問題 | 
                            No.1893 Cycle
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mamo_ICE
                         | 
                    
| 提出日時 | 2022-12-26 22:42:28 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 2,000 ms | 
| コード長 | 266 bytes | 
| コンパイル時間 | 116 ms | 
| コンパイル使用メモリ | 20,352 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-21 09:39:44 | 
| 合計ジャッジ時間 | 917 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     scanf("%d %d\n", &x, &y);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#define swap(type, a, b) do{type t = a; a = b; b = t;}while(0)
int main(void){
    int x, y;
    
    scanf("%d %d\n", &x, &y);
    if(x>y) swap(int, x, y);
    if(y-x == 4) printf("%d\n", (y+4)%12);
    else printf("%d\n", y-4);
    return 0;
}
            
            
            
        
            
mamo_ICE