結果
| 問題 | No.25 有限小数 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-09-05 19:30:20 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 169 bytes |
| 記録 | |
| コンパイル時間 | 115 ms |
| コンパイル使用メモリ | 29,096 KB |
| 最終ジャッジ日時 | 2026-02-23 19:26:24 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 30 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:1:23: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | long a,b,p,q,t;main(){scanf("%ld%ld",&a,&b);for(p=a,q=b;q=t;p=q)t=p%q;for(a/=p,b/=p;a%10<1;a/=10);t=b%2*3+2;for(a%=10;b%t<1;a*=2)b/=t;a=!printf("%d",b-1?-1:t-2?a%10:5);}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | long a,b,p,q,t;main(){scanf("%ld%ld",&a,&b);for(p=a,q=b;q=t;p=q)t=p%q;for(a/=p,b/=p;a%10<1;a/=10);t=b%2*3+2;for(a%=10;b%t<1;a*=2)b/=t;a=!printf("%d",b-1?-1:t-2?a%10:5);}
main.c:1:138: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | long a,b,p,q,t;main(){scanf("%ld%ld",&a,&b);for(p=a,q=b;q=t;p=q)t=p%q;for(a/=p,b/=p;a%10<1;a/=10);t=b%2*3+2;for(a%=10;b%t<1;a*=2)b/=t;a=!printf("%d",b-1?-1:t-2?a%10:5);}
| ^~~~~~
main.c:1:138: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:1:147: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
1 | long a,b,p,q,t;main(){scanf("%ld%ld",&a,&b);for(p=a,q=b;q=t;p=q)t=p%q;for(a/=p,b/=p;a%10<1;a/=10);t=b%2*3+2;for(a%=10;b%t<1;a*=2)b/=t;a=!printf("%d",b-1?-1:t-2?a%10:5);}
| ~^ ~~~~~~~~~~~~~~~~~
| | |
| int
ソースコード
long a,b,p,q,t;main(){scanf("%ld%ld",&a,&b);for(p=a,q=b;q=t;p=q)t=p%q;for(a/=p,b/=p;a%10<1;a/=10);t=b%2*3+2;for(a%=10;b%t<1;a*=2)b/=t;a=!printf("%d",b-1?-1:t-2?a%10:5);}
testestest