結果
| 問題 | 
                            No.701 ひとりしりとり
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tails
                         | 
                    
| 提出日時 | 2020-11-01 01:18:24 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 385 bytes | 
| コンパイル時間 | 193 ms | 
| コンパイル使用メモリ | 28,544 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-22 05:33:24 | 
| 合計ジャッジ時間 | 905 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 12 | 
コンパイルメッセージ
main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | long wbuf[100000];
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%d",&n);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:23:9: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]
   23 |         write(1,wbuf,n*8);
      |         ^~~~~
            
            ソースコード
long wbuf[100000];
main(){
	int n;
	scanf("%d",&n);
	long j=0;
	for(int i=0;i<n-1;++i){
		wbuf[i]=j+0x0a61616161616161l;
		j+=1<<8;
		if(j&1<<12){
			j+=(1l<<16)-(1l<<12);
			if(j&1<<20){
				j+=(1l<<24)-(1l<<20);
				if(j&1l<<28){
					j+=(1l<<32)-(1l<<28);
					if(j&1l<<36){
						j+=(1l<<40)-(1l<<36);
					}
				}
			}
		}
	}
	wbuf[n-1]=0x0a6e616161616161l;
	write(1,wbuf,n*8);
}
            
            
            
        
            
tails