#13180: 為什麼會輸出1005行


lol59487 (Astrayt)

學校 : 臺北市立建國高級中學
編號 : 69066
來源 : [14.160.26.165]
最後登入時間 :
2024-03-02 00:34:47
d235. 10929 - You can say 11 -- UVa10929 | From: [36.228.109.167] | 發表日期 : 2017-12-27 22:19

為什麼會輸出1005行???

#include<iostream>
using namespace std;
int main()
{
int m=11;
long long int n;
while(cin>>n){
if(n%m==0){
cout<<n<<" is a multiple of "<<m<<"."<<'\n';
}else if(n%m!=0){
cout<<n<<" is not a multiple of "<<m<<"."<<'\n';
}else if(n=0){
break;
}
}
return 0;
}

 
#13181: Re:為什麼會輸出1005行


anandrewboy70900 (ShowTsai)

學校 : 國立中央大學
編號 : 27736
來源 : [203.204.218.144]
最後登入時間 :
2024-02-07 22:53:10
d235. 10929 - You can say 11 -- UVa10929 | From: [140.115.204.235] | 發表日期 : 2017-12-27 23:41

N 最大可能到 1000 位數




 
ZeroJudge Forum