結果
問題 | No.537 ユーザーID |
ユーザー |
|
提出日時 | 2017-06-30 22:39:55 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 334 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 20:37:43 |
合計ジャッジ時間 | 1,131 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 7 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%lld",&n); | ^~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>long long count(long long a){if(a/10>0) return 10*count(a/10);else return 10;}int main(int argc, char const *argv[]){long long n,i,ans=0,j;scanf("%lld",&n);for(i=1;i*i<=n;i++){if(n%i==0){j=n/i;if((i+j*count(i))==(j+i*count(j))) ans++;else ans+=2;}}printf("%lld\n",ans);return 0;}